mike-lischke / vscode-antlr4

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

Debugging breakpoints are ignored #74

Closed brikken closed 4 years ago

brikken commented 5 years ago

I've set a breakpoint in my grammar, but debugging (F5) doesn't stop execution at the breakpoint. It simply continues right to the end and produces the parse tree. image

Grammar

grammar Test;

program: id*;
id: ID;

ID: [a-zA-Z]+;
WS: [ \t\r\n]+ -> skip;

launch.json

{
    "version": "2.0.0",
    "configurations": [
        {
            "type": "antlr-debug",
            "request": "launch",
            "name": "antlr4",
            "input": "input.txt",
            "grammar": "Test.g4",
            "startRule": "program",
            "printParseTree": true,
            "visualParseTree": true
        }
    ]
}

In addition, I have to specify the "grammar" and "startRule" elements for debugging to even work, even though the grammar file is active in the editor.

input.txt

abc cde
abc cde

Folder with grammar image

VS Code

Version: 1.32.3 (user setup)
Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4
Date: 2019-03-14T23:43:35.476Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134

Latest version of the extension (just installed)

sipian commented 5 years ago

I am facing the same issue in Ubuntu Linux. Breakpoints are being ignored. vscode version: 1.33.1 Linux Kernel: x64 4.15.0-47-generic

solartes commented 5 years ago

Same problem to me image Any solution here?

mike-lischke commented 4 years ago

There was a problem with breakpoint resolution, which I fixed recently. Can you guys try the latest version from the vscode marketplace and let me know if that solves your issues?

brikken commented 4 years ago

I still had the test from my original post lying around, so I tried it again. Now it breaks at the breakpoint, but both stepping over (F10) and stepping in (F11) finishes the debugging session and outputs the parse tree to the debug log. If that's a real issue, I'll create a new one.

elipersonal commented 2 years ago

hi @mike-lischke, which version this issue was fixed at? I am still seeing this issue in version v2.2.4.

vscode version is: 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

mike-lischke commented 2 years ago

@elipersonal Please don't hijack an already closed bug. Usually such bugs (particularly when they are so old) have completely different circumstances to consider, than your current problem. Instead, open a new bug. Thanks.

elipersonal commented 2 years ago

I am sorry, i am fairly new to this. will open a new bug instead. thanks again