Closed elipersonal closed 2 years ago
Have you tried to break your rules into multiple lines? The way they are now will make the breakpoints be rule exit breakpoints. There are only two types of breakpoints: rule enter and rule exit. If the rule name and its semicolon are on the same line then a breakpoint on that line becomes automatically the exit breakpoint.
when i broke rule top into 2 lines, it seems it is still an exit breakpoint. how can i get an rule-enter breakpoint on rule top? thank you very much!
does anyone know how to do this? I appreciate your help!
Put the semicolon on an own line. When a semicolon is on the line for which a breakpoint is set, that will always become a rule exit breakpoint.
that worked. thank you very much Mike!
I have the same problem too. My grammar file was Calculator.g4, when I changed ${file} to Calculator.g4 the problem disappeared
debugging failed to stop at the breakpoints.
gramma:
Launch.json: { "version": "0.2.0", "configurations": [ { "name": "Debug g4", "type": "antlr-debug", "request": "launch", "input": "${relativeFileDirname}\input.txt", "grammar": "${file}", "printParseTree": true, "visualParseTree": true } ] }
ANTLR4 grammar syntax support version: v2.2.4
VSCode version: Version: 1.64.0 (user setup) Commit: 5554b12acf27056905806867f251c859323ff7e9 Date: 2022-02-03T04:22:20.678Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19043