PPC
PPC

Reputation: 1903

Move debugger up the stack in Visual Studio

Visual studio (I'm using Community 2015) allows you to drag and drop the yellow execution pointer around in the same function.

Is there a way to move that pointer up the stack, and especially when the debugger is waiting on the user after an exception has been thrown?

EDIT: Ideally no user code should execute during that process, as it can mess things up with other variables

Upvotes: 1

Views: 621

Answers (2)

nestedloop
nestedloop

Reputation: 2646

Use the 'Step Out' functionality.

Shift + F11

is the shortcut by default.

Just a caveat: stepping out will execute the rest of the code in the method before going back up the stack.

Upvotes: 1

PPC
PPC

Reputation: 1903

I found a way. This is maybe not the easiest way around, but it's always possible to

  • first drag and drop the yellow arrow to the end of the current function
  • the execute as many step-out (Shift-F11) and "drag-to-end-of-function" as required

Of course it will "execute" some code, but if carefully done, it's only stack managing code, not user code, thus should not interfere with user variables.

Upvotes: 2

Related Questions