Visual Studio Debug – Tips And Tricks – Part 1

We use Visual Studio many hours a day but can we say that we know all the tips and tricks?

Here I share a brief collection of 3 debugging tips that I collected.

Step into specific

This feature is helpful when we have a situation like below. We set a breakpoint in line 9 and when the program counter hits that point. Now we would like to jump directly into Spagetti() without stepping into Parmiggiano(). To do so we right-click the program-counter line, Step Into Specific and then Spaghetti().

Run To Cursor (CTRL + F10)

If we have a situation like the following picture we may want to run to line 20 without stepping-over (F10) many times. With Run To Cursor we can run to the statement where our cursors is located and stop there. We can do this with right click, Run To Cursor or with the CTRL+F10 keyboard shortcut.

Peek definition

If we want to look quickly without changing context to a definition of a method or class we can use the ALT+F12 keyboard shortcut. It opens a frame inside our current code to show details of what we selected.

TL; DR

In future posts I’ll share other tricks! Stay tuned!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.