Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DebuggerNonUserCode to generated classes #106

Open
rubberduck203 opened this issue May 15, 2015 · 5 comments · May be fixed by #350
Open

Add DebuggerNonUserCode to generated classes #106

rubberduck203 opened this issue May 15, 2015 · 5 comments · May be fixed by #350

Comments

@rubberduck203
Copy link

As a dev, it would be nice for the debugger to step over the generated code by default. It is possible to add the DebuggerNonUserCode attriubute to the generated classes and set up Visual Studio so that the debugger skips over the code with the Just My Code option, but this would need to be done manually each time the ANTLR project is built.

Is there any possibility of ANTLR adding this attribute to the generated code itself in a future release?

@sharwell
Copy link
Member

Unfortunately this would make it impossible (or very difficult) to debug code contained in semantic predicates and embedded actions. However, if someone wanted to implement this as an option (similar to the way generation of abstract grammars is an option), I wouldn't be opposed to that.

@rubberduck203
Copy link
Author

Any tips on where to get started? I wouldn't mind giving it a go myself.

@garyhuntddn
Copy link

I thought I'd have a go at this one - I know it's just 5 years old :-) but I wanted a quick look at how it might be done. See my PR

@KvanTTT
Copy link

KvanTTT commented May 24, 2020

Maybe related: antlr/antlr4#2365

@garyhuntddn
Copy link

@KvanTTT I'm not sure how alive the project is at the moment and whether PR's will get merged - but I'd vote for also including your suggestion of -Ddebug flag in addition to my one.

My only concern is that -Ddebug might lead other to think it did something different than it did - but to be honest I can't imagine many people will look :-)

@garyhuntddn garyhuntddn linked a pull request May 30, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants