We recently moved to a 64 bit OS (Windows 7) and installed visual studio 2008. Now while debugging once an exception is caught, I am not able to set the next statement back to a code in the try block. I googled about this and hit with this article.
http://blogs.msdn.com/b/dougste/archive/2007/03/21/unable-to-set-next-statement-when-debugging-a-64-bit-debuggee-in-visual-studio-2005-sometimes.aspx
That explains it but This is dated back in 2007. Is there any solution or a work around now?
.NET uses the underlying plumbing of Windows' structured exception handling. There's a Big Difference in the way x64 exception handling is implemented. It uses tables of addresses, generated by the compiler to locate the proper exception filter. x86 uses a linked list of function pointers, much easier to implement by a compiler.
One of the reasons the x64 way was changed was for security reasons, viral code managed to inject itself by patching the linked list and causing an exception, allowing its payload to execute. There were counter-measures against that in XP SP1, at a cost of efficiency. The x64 redesign avoids that cost.
Well, you can see where that's heading. You ought to debug code with the Platform Target set to x86 anyway. This also enables Edit + Continue, a very valuable debugging aid. It is the default setting for VS2010 projects. Only flip to AnyCPU for the Release build.
Crazy answer: put only an assigment to variable in the catch and an if/process below it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With