VsCode build error reference links unclickable

rfleming
Posts: 62
Joined: Tue Oct 09, 2018 12:30 am

VsCode build error reference links unclickable

Postby rfleming » Sat Sep 18, 2021 2:31 am

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.
Attachments
errors.png
errors.png (25.92 KiB) Viewed 7506 times

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: VsCode build error reference links unclickable

Postby ESP_bignacio » Fri Oct 08, 2021 1:31 pm

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 ?

rfleming
Posts: 62
Joined: Tue Oct 09, 2018 12:30 am

Re: VsCode build error reference links unclickable

Postby rfleming » Mon Oct 11, 2021 7:08 am

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
            }
        }
    ]
}

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: VsCode build error reference links unclickable

Postby ESP_bignacio » Tue Oct 19, 2021 5:59 am

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.

rfleming
Posts: 62
Joined: Tue Oct 09, 2018 12:30 am

Re: VsCode build error reference links unclickable

Postby rfleming » Wed Oct 20, 2021 12:53 am

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 ^^

Who is online

Users browsing this forum: No registered users and 18 guests