Giter Site home page Giter Site logo

Comments (7)

mike-lischke avatar mike-lischke commented on June 18, 2024

Can you describe how you started debugging? Share your launch config here too.

from vscode-antlr4.

dannyb2018 avatar dannyb2018 commented on June 18, 2024
{
    // 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

from vscode-antlr4.

Andreev-Sergey avatar Andreev-Sergey commented on June 18, 2024

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.

from vscode-antlr4.

mike-lischke avatar mike-lischke commented on June 18, 2024

Odd, isn't join supposed to take care of absolute paths? Need to investigate. Thanks for digging into the code @Andreev-Sergey.

from vscode-antlr4.

dannyb2018 avatar dannyb2018 commented on June 18, 2024

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

from vscode-antlr4.

mike-lischke avatar mike-lischke commented on June 18, 2024

Fixed by commit c537c2c

from vscode-antlr4.

michaelp avatar michaelp commented on June 18, 2024

@mike-lischke when will this fix be published to the VSCODE marketspace ?

from vscode-antlr4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.