How can I tell the Visual Studio debugger to never enter a specific file?

I have several ANTLR-generated code files and am currently happy with how they work. I would like to set up my project in Visual Studio (2008) so that the debugger skips the methods defined in these files. How can i do this?

+3
source share
2 answers

You can attach an attribute DebuggerStepThroughto properties to skip them. You can set breakpoints in methods.

[DebuggerStepThrough()]
private void DontDebugMe(string message) {}
     ....

or 
[DebuggerStepThrough()]
public class BuhBye { .. }

, DebuggerNonUserCode DebuggerHidden, VS . .

  • DebuggerNonUserCode /etc .

StepThrough , , , / . .

+4

, :
Visual ++

, VS. , .

+1

Source: https://habr.com/ru/post/1741356/


All Articles