File tree 5 files changed +66
-41
lines changed
5 files changed +66
-41
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 0.2.0" ,
4
4
"configurations" : [
5
5
{
6
- "name" : " (gdb) Build & debug" ,
7
6
"preLaunchTask" : " build" ,
8
- "type" : " gdb" ,
7
+ "name" : " Ada - Build & Debug (unix)" ,
8
+ "type" : " cppdbg" ,
9
9
"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}"
25
12
},
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
+ }
26
22
]
27
- }
23
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3
3
"version" : " 0.2.0" ,
4
4
"configurations" : [
5
5
{
6
- "name" : " (gdb) Build & debug" ,
7
6
"preLaunchTask" : " build" ,
8
- "type" : " gdb" ,
7
+ "name" : " Ada - Build & Debug (unix)" ,
8
+ "type" : " cppdbg" ,
9
9
"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}"
25
12
},
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
+ }
26
22
]
27
23
}
Original file line number Diff line number Diff line change @@ -11,4 +11,40 @@ Use embedded terminal to launch your executable.
11
11
12
12
## 🐞 Debug
13
13
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 ) .
Original file line number Diff line number Diff line change 6
6
"publisher" : " AdaCore" ,
7
7
"license" : " GPL-3.0" ,
8
8
"engines" : {
9
- "vscode" : " ^1.64.2 "
9
+ "vscode" : " ^1.67.0 "
10
10
},
11
11
"categories" : [
12
12
" Programming Languages" ,
13
13
" Extension Packs"
14
14
],
15
15
"extensionPack" : [
16
- " webfreak.debug "
16
+ " ms-vscode.cpptools "
17
17
],
18
18
"activationEvents" : [
19
19
" onLanguage:ada" ,
You can’t perform that action at this time.
0 commit comments