Did you know? You can unwind the call stack from exceptions (Bill Horst)

Did you know? You can unwind the call stack from exceptions (Bill Horst)

  • Comments 2

The ability to unwind the call stack from exceptions is one of the debugger features that was newly introduced in Visual Basic.NET 2005. When the debugger hits a first-chance exception, you can unwind the call stack in order to make code edits to fix the exception and continue debugging with the changes. The exception assistant UI will have an “Enable Editing” option which will unwind the debugger to the topmost call stack frame with code in the current solution.

When an exception is unhandled, the unwind will occur automatically, but this can be turned on and off from the Options dialog (under Tools).

If you attempt to edit code after an exception has been hit, but before an unwind, you're allowed the option of unwinding and editing the code, stopping the debugging session, or canceling the edit.

The user can also unwind from the call stack window, by right-clicking the desired frame and selecting “Unwind To This Frame”. This is only available when an exception has been hit and not yet unwound, and only on frames sufficiently high on the call stack.

We hope that this functionality will allow you to be more effective in their debugging, and will help you better leverage the “Edit and Continue” capabilities in Visual Basic.

Leave a Comment
  • Please add 4 and 7 and type the answer here:
  • Post
  • Hey VB Team, great article!  It’s only through educating ourselves do we become better at what we do and I always appreciate the bogs at MSDN.com.  Thanks for taking the time to write the article.

    Best regards,

    Sean Gahan

    http://seangahan.net

  • I was constantly faced with this error Thanks it helped

Page 1 of 1 (2 items)