mike-lischke / vscode-antlr4

ANTLR4 language support for Visual Studio Code
http://www.soft-gems.net
MIT License
422 stars 58 forks source link

Grammar changes not detected during debug unless VSCode restarted. #176

Open meadjm opened 2 years ago

meadjm commented 2 years ago

Having a very similar issues as reported in #97. I'm not using a split grammar. When I make a change to my grammar and save the changes, I'm seeing the changes in the .antlr directory being updated or being recreated if I delete the files in that directory. I do not see any of my changes in the output tree when debugging unless I restart VSCode or toggle my work space folder. I'm currently using the latest version of VSCode and version 2.3.0 of ANTLR grammar syntax support using Win10. It was previously working on my system about 6 months ago. Any ideas what could be causing this?

meadjm commented 2 years ago

This problem appears to be related to the "grammar" parameter. Initially I defined the full path for the grammar using either the "\" directory delimiter or the "//" delimiter but this had no affect on the issue. I finally used the ${file} token and it corrected the issue. i.e. `"grammar": "${file}"'.

TheBoz commented 1 year ago

I am having this same issue using Antlr version 4.9.3 and C#. Changes saved in my grammar do not update the output parse tree(s) when I re-launch the antrl-debug task. I tried the "grammar" : "${file}" token that meadjm mentioned, but it didn't correct the issue for me. This is a key feature when building out a grammar. Are other VSCode users experiencing this? Is there a workaround? Has there been any movement on this ticket?

GittingGudAtIT commented 1 year ago

My dirty workaround was to define a keyboard shortcut in VSCode to reload. action: workbench.action.reloadWindow

farqq commented 1 year ago

I think the problem is here (using "/") image

For now, u can use the relative path to fix it out. It works for me.

mike-lischke commented 9 months ago

Has anyone here already tried with the latest version of the extension? I cannot reproduce this issue. However, the fix for issue #97 might also help for this issue.

@farqq This method is actually not used in the code, which means I can remove it.

MJLHThomassenHadrian commented 2 months ago

Running 2.4.6 of the extension and having the same issue here.