I have a couple ANTLR-generated code files, and I’m currently happy with how they are working. I’d like to configure my project in Visual Studio (2008) so the debugger skips over methods defined in those files. How can I do this?
I have a couple ANTLR-generated code files, and I’m currently happy with how they
Share
You can attach the
DebuggerStepThroughattribute to properties to make it skip them. You can still set breakpoints in the methods.I should add that you can also use the
DebuggerNonUserCodeattribute andDebuggerHiddento prevent VS from stepping in at all, or even respecting breakpoints in the code. Doubt you want that, though.DebuggerNonUserCodealso prevents the property/etc from displaying in the debugger window.I use the StepThrough one all over the place though, since we compile in 3rd party code’s and I don’t want to step into their methods when debugging, or go into the container’s name resolution/object creation code. Very handy for that.