Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2008 Debugging - Skipping code

Tags:

Is there a way to skip code without having to set a breakpoint after it? I am using the debugging to explore code with a GUI painting event that runs lots of times. I wish to see what comes after the event is done triggering without having to click next a bunch of times.

like image 786
JonasB Avatar asked Aug 31 '09 14:08

JonasB


People also ask

How do I skip the code while debugging in Visual Studio?

You can also click on the line you want to skip to and hit Ctrl+F10 (Run to Cursor). It will jump directly to that line.

How do I Debug in Visual Studio 2008?

On the remote computer, launch Visual Studio 2008 Remote Debugger Configuration Wizard (in Start Menu\Programs\Microsoft Visual Studio 2008\Visual Studio Tools), uncheck Run the "Visual Studio Remote Debugger" service and choose Allow any computer to connect to the remote debugger.

How do I disable debugging in Visual Studio 2008?

C# and VB.net Projects With your project open, select the “Project” tab, then choose “appname Properties…“. Select “Debug” on the left pane. Check the “Enable native code debugging” box to enable it. Uncheck it to disable it.

How do I fix the Debug executable in Visual Studio?

Just use File/Open Project/Solution, select EXE file and Open it. Then select Debug/Start debugging. The other option is to run the EXE first and then Select Debug/Attach to process.


1 Answers

[DebuggerHidden]  

When this attribute is attached to a constructor/method/property or indexer then that code is hidden from the debugger, it will not be possible for you to step into the code, the debugger will just skip over the code. Even if you set a breakpoint inside one of the pieces of code decorated with this attribute, the debugger will ignore it.

[DebuggerStepThrough] 

This attribute is the same as the DebuggerHiddenAttribute, apart from the fact that you can set a breakpoint inside the code which has been decorated with the DebuggerStepThroughAttribute, and the debugger will stop at the breakpoint.

[DebuggerNonUserCode] 

This attributes marks a section of code as not being user code, you can then use this with the Tools->Options->Debugging->General->Enable Just My Code, option to tell the debugger not to step into the decorated code.

like image 174
Jaimal Chohan Avatar answered Oct 09 '22 17:10

Jaimal Chohan