Skip to content

Commit d1f072c

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents 6df8059 + 601e6eb commit d1f072c

File tree

5 files changed

+66
-41
lines changed

5 files changed

+66
-41
lines changed

integration/vscode/Code Samples/docker/.vscode/launch.json

+14-18
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,21 @@
33
"version": "0.2.0",
44
"configurations": [
55
{
6-
"name": "(gdb) Build & debug",
76
"preLaunchTask": "build",
8-
"type": "gdb",
7+
"name": "Ada - Build & Debug (unix)",
8+
"type": "cppdbg",
99
"request": "launch",
10-
"cwd": "${workspaceFolder}",
11-
"valuesFormatting": "parseText",
12-
"windows": {
13-
"target": "${workspaceRoot}/obj/hello.exe",
14-
"MIMode": "gdb",
15-
"miDebuggerPath": "C:/GNAT/bin/gdb.exe" // Path to gdb on windows
16-
},
17-
"linux": {
18-
"target": "${workspaceRoot}/obj/hello",
19-
"MIMode": "gdb"
20-
},
21-
"osx": {
22-
"target": "${workspaceRoot}/obj/hello",
23-
"MIMode": "lldb"
24-
}
10+
"program": "${workspaceFolder}/obj/hello",
11+
"cwd": "${workspaceFolder}"
2512
},
13+
{
14+
"preLaunchTask": "build",
15+
"name": "Ada - Build & Debug (Windows)",
16+
"type": "cppvsdbg",
17+
"request": "launch",
18+
"program": "${workspaceFolder}/obj/hello.exe",
19+
"externalConsole": true,
20+
"cwd": "${workspaceFolder}"
21+
}
2622
]
27-
}
23+
}

integration/vscode/Code Samples/hello/.vscode/extensions.json

-3
This file was deleted.

integration/vscode/Code Samples/hello/.vscode/launch.json

+13-17
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,21 @@
33
"version": "0.2.0",
44
"configurations": [
55
{
6-
"name": "(gdb) Build & debug",
76
"preLaunchTask": "build",
8-
"type": "gdb",
7+
"name": "Ada - Build & Debug (unix)",
8+
"type": "cppdbg",
99
"request": "launch",
10-
"cwd": "${workspaceFolder}",
11-
"valuesFormatting": "parseText",
12-
"windows": {
13-
"target": "${workspaceRoot}/obj/hello.exe",
14-
"MIMode": "gdb",
15-
"miDebuggerPath": "C:/GNAT/bin/gdb.exe" // Path to gdb on windows
16-
},
17-
"linux": {
18-
"target": "${workspaceRoot}/obj/hello",
19-
"MIMode": "gdb"
20-
},
21-
"osx": {
22-
"target": "${workspaceRoot}/obj/hello",
23-
"MIMode": "lldb"
24-
}
10+
"program": "${workspaceFolder}/obj/hello",
11+
"cwd": "${workspaceFolder}"
2512
},
13+
{
14+
"preLaunchTask": "build",
15+
"name": "Ada - Build & Debug (Windows)",
16+
"type": "cppvsdbg",
17+
"request": "launch",
18+
"program": "${workspaceFolder}/obj/hello.exe",
19+
"externalConsole": true,
20+
"cwd": "${workspaceFolder}"
21+
}
2622
]
2723
}

integration/vscode/ada/media/launch-debug.md

+37-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,40 @@ Use embedded terminal to launch your executable.
1111

1212
## 🐞 Debug
1313

14-
Install Native Debug and configure `launch.json` to run the debugger.
14+
The [ms-vscode.cpptools](https://github.com/microsoft/vscode-cpptools) extension
15+
is automatically installed along with this extension, allowing to use its
16+
integration for GDB to debug Ada code.
17+
18+
You will just need to add a proper debug configuration in your `launch.json`
19+
file. Let's consider a basic `.gpr` project, which produces a
20+
`main` executable in an `obj` directory:
21+
22+
```
23+
project Default is
24+
25+
for Main use ("main.adb");
26+
for Object_Dir use "obj";
27+
28+
end Default;
29+
30+
```
31+
32+
A basic `launch.json` file which allows to debug the produced `main`
33+
executable would be:
34+
35+
```
36+
{
37+
"name": "Ada Debugging",
38+
"type": "cppdbg",
39+
"request": "launch",
40+
"program": "${workspaceFolder}/obj/main",
41+
"cwd": "${workspaceFolder}"
42+
}
43+
44+
```
45+
46+
You will then be able to go to the `Run and Debug` VS Code panel
47+
in order to run the newly added debugger.
48+
49+
You can find more information about how to configure the debugger
50+
[here](https://code.visualstudio.com/docs/cpp/launch-json-reference).

integration/vscode/ada/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"publisher": "AdaCore",
77
"license": "GPL-3.0",
88
"engines": {
9-
"vscode": "^1.64.2"
9+
"vscode": "^1.67.0"
1010
},
1111
"categories": [
1212
"Programming Languages",
1313
"Extension Packs"
1414
],
1515
"extensionPack": [
16-
"webfreak.debug"
16+
"ms-vscode.cpptools"
1717
],
1818
"activationEvents": [
1919
"onLanguage:ada",

0 commit comments

Comments
 (0)