Closed dannyb2018 closed 1 year ago
Can you describe how you started debugging? Share your launch config here too.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug hedge strategies ANTLR4 grammar",
"type": "antlr-debug",
"request": "launch",
"input": "./src/main/java/ai/liquidmarkets/structured_products/server/grammar/hedge_strategies/strategies/call_spread.hs",
"grammar": "./src/main/java/ai/liquidmarkets/structured_products/server/grammar/hedge_strategies/grammar/QPHedgeStrategy.g4",
"startRule": "hedgeStrategy",
"printParseTree": true,
"visualParseTree": true
}
]
}
I can add the grammar files too but they havent changed since the previous version that worked
Hi.
I found a similar problem.
After debugging extension it seems that error in backend/facade.ts: loadGrammar.
The parameter "fileName" is from editor.document.fileName and has absolute path in my case, so combining it with current working dir leads to an exception. Changing
fs.statSync(path.join(process.cwd(), fileName));
line to
fs.statSync(fileName);
works fine for me.
Odd, isn't join
supposed to take care of absolute paths? Need to investigate. Thanks for digging into the code @Andreev-Sergey.
Should mention I am running on Linux Ubuntu 22.04.03 so is not just a windows issue
Let me try to verify it is the same issue
Fixed by commit c537c2c
@mike-lischke when will this fix be published to the VSCODE marketspace ?
Had two existing grammar that were working with previous version of the extension - 2.3.1 - and now it is saying:
Error: Debugger creation failed. You are either trying to debug an unsupported file type or no interpreter data has been generated yet for the given grammar