关于调试:如何在Visual Studio Express中查看异常详细信息?

How to view exception details in Visual Studio Express?

您如何查看VS Express 2012中的异常详细信息,如消息和堆栈跟踪?我正在使用Visual Studio Express 2012 for Windows Phone,每当调试时引发异常时,Visual Studio所做的全部工作就是突出显示发生异常的代码行。Screenshot of the problem


您可以按Break按钮,然后在Locals下查看异常详细信息。在那里找$exception


异常助手已从Visual Studio 2012的Express版本中删除。从这里:

You are correct that we intentionally removed the exception assistant from the WDX sku for VS 2012. In 2012, pro and above are required for this functionality. You should be able to view the exception information in the watch window including the inner exception.

We'll take your feedback and look into possibly adding this dialog back into the express skus in a future release but we have no plans of changing this for 2012 at this time.

Marc Paine

Visual Studio Debugger QA Lead

除非有一天有更新将其添加回去,否则你必须购买一个完整版本的vs 2012。


是的,真麻烦!但幸运的是,除非在外部代码中抛出异常,否则可以通过将有问题的代码行临时封装在try-catch块中,然后在catch中设置断点来消除这种情况:

enter image description here