How to view exception details in Visual Studio Exp

2019-06-16 11:01发布

How do you view exception details such as messages and stack traces in VS Express 2012? I am using Visual Studio Express 2012 for Windows Phone, and whenever an exception is thrown while debugging, all Visual Studio does is highlight the line of code at which the exception occurred. Screenshot of the problem

3条回答
我想做一个坏孩纸
2楼-- · 2019-06-16 12:04

The Exception Assistant has been removed from the Express versions of Visual Studio 2012. From here:

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

Unless there's an update one day to add it back, you'd have to buy a full version of VS 2012.

查看更多
倾城 Initia
3楼-- · 2019-06-16 12:04

You can press Break button and then look into exception details under Locals. Look for $exception there.

查看更多
我想做一个坏孩纸
4楼-- · 2019-06-16 12:05

Yes, what a bother! But luckily, unless the exception is thrown in external code, you can defuse the situation by temporarily enveloping the offending code line in a try catch block, then setting a break point inside catch:

enter image description here

查看更多
登录 后发表回答