vscode-antlr4
vscode-antlr4 copied to clipboard
Grammar changes not detected during debug unless VSCode restarted.
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?
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}"'.
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?
My dirty workaround was to define a keyboard shortcut in VSCode to reload. action: workbench.action.reloadWindow
I think the problem is here (using "/")
For now, u can use the relative path to fix it out. It works for me.
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.