Page 1 of 1

VsCode build error reference links unclickable

Posted: Sat Sep 18, 2021 2:31 am
by rfleming
Hi All,

I have been using vscode for a while now and I am pretty sure I am out of the look with this...so hoping someone has the answer. When I first started using the application, after a compilation of errors it would highlight in red the error line and provide me with the ability to click on it.

Example attached.

I know that the actual folder referenced is the build folder, so natively clicking on the links won't do anything, though I am hoping there is a work around that would allow be to set some "default path" or similar for selecting these errors. These build errors don't appear to be linked to the "problems" tab either. Things only appear in there based on intellisense rather than compilation errors.

Looking foward to better IDE knowledge :)
Ryan.

Re: VsCode build error reference links unclickable

Posted: Fri Oct 08, 2021 1:31 pm
by ESP_bignacio
How are you building ?

Are you using a custom task in tasks.json ? You can customize the task output so it can parse those source files location so you can jump from the output.

Are you using an extension, which one ?

Re: VsCode build error reference links unclickable

Posted: Mon Oct 11, 2021 7:08 am
by rfleming
The answer to this mostly comes my lack of knowledge for how to correctly configure vscode with esp ^^

I build in 2 different ways atm. 1 is direct in the terminal and manually run "idf.py build" I am unsure if this could ever provide the feedback back to vscode or not.

The other is to "Run Build Task..." Ctrl + Shift + B". In my tasks.json I have the following:

Code: Select all

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "isBackground": true,
            "options": {
                "cmd": "${workspaceFolder}"
            },
            "command": "idf.py build",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

Re: VsCode build error reference links unclickable

Posted: Tue Oct 19, 2021 5:59 am
by ESP_bignacio
In the ESP-IDF extension we have a template tasks.json which is included when you create a project with extension commands.

template tasks.json where for example the build task has a problem matcher defined to get errors shown at the Problems tab. This task is using extension settings to resolve binaries or paths such as ${config:idf.espIdfPath} to get IDF_PATH, you could either replace those with your paths or use the extension directly.

Re: VsCode build error reference links unclickable

Posted: Wed Oct 20, 2021 12:53 am
by rfleming
Perfect, thanks for that.

This project was created a few years ago when we were using eclipse and has gone through various evolutions. So the new templates were never brought in ^^