Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In visual studio 2012 cannot return to code from exception

There is very useful feature in all previous versions of Visual Studio: if I make a break point in catch block of try...catch construction then when an exception occurs I can drag the current position of code to try block. It allows me to see what error occurred. For example:

try
{
    int i=0;
    int j=1/i;
}
catch(Exception ex)
{
    string s="";  //here I may set a break point and then drag a cursor to try block
}

But it is not possible in VS 2012! I can't return to try block. May be I missed something in options? It's very sad if they cancelled this feature. Solution: My web site was under application pool ASP.NET V4.0 Integrated where property "Enable 32-bit applications" was set to false. When I changed application pool to other one and set this property to True I succeeded to return to try block

like image 993
eug100 Avatar asked Dec 02 '25 10:12

eug100


2 Answers

You can't do that in Visual Studio 2010 either, this is nothing new in Visual Studio 2012.

Edit: Unless it's Ultimate it seems (with Intellitrace enabled).

like image 55
mattytommo Avatar answered Dec 05 '25 01:12

mattytommo


Looks that the functionality you're asking for is only build in if you're using the ultimate version of visual studio:

Step through a program backwards after an Exception has occurred - Visual Studio

I use ultimate and IntelliTrace makes it possible:

enter image description here

enter image description here

like image 37
Kai Avatar answered Dec 04 '25 23:12

Kai