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

Can't get debugger to work #65

Closed
MishaBeek opened this issue Jan 4, 2019 · 4 comments
Closed

Can't get debugger to work #65

MishaBeek opened this issue Jan 4, 2019 · 4 comments

Comments

@MishaBeek
Copy link

Hi,

I know a similar issue has been posted, but that does not seem to cause of my problem.
I have set up the following launch file:

{ "version": "2.0.0", "configurations": [ { "name": "Debug ANTLR4 grammar", "type": "antlr-debug", "request": "launch", "input": "MyParser/example1.sql", "grammar": "MyParser/src/main/java/org/parser/MyParser.g4", "startRule": "statement", "printParseTree": true, "visualParseTree": true } ] }

When starting the debug with F5 I get an error message: 'typeerror cannot set property 'inputstream' of undefined'

Both the grammar file (combined) and the input file exist. The startRule also exists in the grammar. I just trying to locate the cause of this issue. I am using VsCode on Windows 10.

Any advice/guidance is appreciated.

Thanks,

Misha

@mike-lischke
Copy link
Owner

Have you enabled parser generation and saved your grammar at least once?

@MishaBeek
Copy link
Author

MishaBeek commented Jan 4, 2019 via email

@mike-lischke
Copy link
Owner

mike-lischke commented Jan 4, 2019

The default for parser generation is internal which saves all the generated file (and most important: the interpreter data) in the subfolder .antlr of your workspace folder. See there if you have the . interp file for your grammar. Debugging is not possible without this file. And btw, it doesn't make any difference if you use a combined or separated grammar.

@mike-lischke
Copy link
Owner

Anything I can do here yet? If not I'll close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants