2012-03-27 175 views
0

我无法调试我的windows phone 7 project.while windows phone模拟器正在启动,代码停止在System.Diagnostics.Debugger.Break();windows phone 7.1上的调试

我该如何调试我的项目?

private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) 
{ 
    if (System.Diagnostics.Debugger.IsAttached) 
    { 
     // An unhandled exception has occurred; break into the debugger 
     **System.Diagnostics.Debugger.Break();** 
    } 
} 
+0

检查异常消息。这可能是导航问题导致的异常。 – Vitalij 2012-03-27 21:50:15

+0

尝试使用Watch Window查看e.Message的值是什么。 – 2012-03-28 11:51:15

回答

1

问题已解决。在确定当前位置的同时,由于手机GPS出现问题。感谢大家的帮助。

0

将您的代码放在Try-Catch Block中。我也遇到了这样的问题,但后来由异常处理方法处理。

try 
{ 

    // your code 

} 

catch (Exception ex) 
{ 

    throw (ex); 
}