Matt Cashatt
Matt Cashatt

Reputation: 24218

Visual Studio Debugging: How do I go to specific line without dragging the debug arrow?

I have a class with many lines in it. I can hit a breakpoint and then drag the yellow break arrow back to a specific line but it can be difficult to do this when the line of code you need is hundreds of lines away.

Is there a way to accomplish this by typing in the line number you'd like to take the arrow to?

Also, how do you jump to a line in a different class file?

Thanks in advance.

Upvotes: 1

Views: 2726

Answers (2)

BJ Myers
BJ Myers

Reputation: 6823

Right-click the desired line and select "Set next statement". Or you can use the default keyboard shortcut Ctrl+Shift+F10.

This feature can only be used to set the statement to another line in the same method/function, so you won't be able to skip to a different file.

Upvotes: 7

MotKohn
MotKohn

Reputation: 3965

You don't have to drag the yellow line just go to the line right click and select set next statement

Upvotes: 2

Related Questions