I've setup VS code (1.80.1) and the "Language support for Ada" extension (23.0.19) on Windows according to the tutorial here https://github.com/AdaCore/ada_language_server/wiki/Getting-Started
While debugging, when I try to step into a function whose source is outside the project directory, VS code fails to find it, tries to open a non-existent file instead and a pop-up shows up with an error.
As an example, when I try to step into the Put_Line function of Ada.Text_IO, I get the following pop-up
https://preview.redd.it/i506rjsmdxbb1.png?width=461&format=png&auto=webp&s=2f55dfb0f804b82558af31e31670b024c02ffae1
And it tries to open the following file which doesn't exist: C:\aaa\GNAT-FSF-builds\sbx\x86_64-windows64\gcc\build\gcc\ada\rts\a-textio.adb
I have the following tasks in my tasks.json file (I've tried both options, they both have the same issue with debugging):
{ "type": "gnat", "taskKind": "buildProject", "problemMatcher": [ "$ada" ], "group": { "kind": "build", "isDefault": true }, "label": "ada: Build current project", "args": ["-gargs", "-q"] }, { "label": "Alire Build", "type": "shell", "command": "alr build -- -cargs -gnatef", "group": { "kind": "build", "isDefault": true }, "problemMatcher": { "base": "$ada" } }
And in my launch.json file:
{ "preLaunchTask": "ada: Build current project", "name": "Ada - Build & Debug (Windows)", "type": "gdb", "request": "launch", "target": "./obj/main.exe", "cwd": "${workspaceRoot}", "valuesFormatting": "parseText" }
What am I doing wrong? How can I fix this?