|
1 | 1 | # 🔨 Build a project
|
2 | 2 |
|
3 |
| -Use "auto-detected tasks" to |
4 |
| - * ⚙ Build whole project |
| 3 | +Use "auto-detected tasks" (i.e: `gnat` tasks in the `Run Task` dialog) to |
| 4 | + * ⚙ Build the whole project |
5 | 5 | * ✅ Check errors in the current file
|
6 |
| - * 🔎 Lauch `gnatprove` to verify the code |
| 6 | + * 🔎 Launch `gnatprove` to verify your SPARK code, if any (you can find the tool [here](https://github.com/alire-project/GNAT-FSF-builds/releases)) |
7 | 7 |
|
8 | 8 | ## 🚀 Launch
|
9 | 9 |
|
10 |
| -Use embedded terminal to launch your executable. |
| 10 | +Open a new terminal to launch your executable once it has been built. |
11 | 11 |
|
12 | 12 | ## 🐞 Debug
|
13 | 13 |
|
14 | 14 | The [ms-vscode.cpptools](https://github.com/microsoft/vscode-cpptools) extension
|
15 | 15 | is automatically installed along with this extension, allowing to use its
|
16 | 16 | integration for GDB to debug Ada code.
|
17 | 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: |
| 18 | +The extension provides default debug configurations for all the mains of your |
| 19 | +project. You can debug the executable of your choice by opening the |
| 20 | +`Run and Debug` panel and then by clicking on the `Run and Debug` button. |
| 21 | +You can also run directly the `Debug: Start Debugging` command instead of using the UI. In some circumstances the UI may offer a selection of languages, in which case select `Ada`. |
| 22 | +The extension will then propose you to select the main you want to debug if your project contains several mains. |
21 | 23 |
|
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). |
| 24 | +If you want to customize GDB's behavior or if you need to add custom arguments, you |
| 25 | +will have to create a `launch.json` file: this can be done through the |
| 26 | +`create a launch.json file` link button in the `Run and Debug` panel or directly via |
| 27 | +the `Debug: Add Configuration` command. |
0 commit comments