Skip to content

Commit 5dcdde2

Browse files
author
Amanda Butler
authored
Merge pull request #410 from janjongboom/patch-6
Update vscode.md to instruct Windows users to install GNU Make + inst…
2 parents 67e4aac + b54f877 commit 5dcdde2

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

docs/tutorials/debug/vs_code.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## Visual Studio Code
22

3-
This document explains how to build and debug Arm Mbed OS applications using Visual Studio Code. Before starting, first [configure your local debug toolchain](/docs/v5.6/tools/setting-up-a-local-debug-toolchain.html).
3+
This document explains how to build and debug Arm Mbed OS applications using Visual Studio Code. Before starting, first [configure your local debug toolchain](/docs/v5.7/tools/setting-up-a-local-debug-toolchain.html).
4+
5+
Also install [GNU Make](https://www.gnu.org/software/make/) or [Mbed CLI](/docs/v5.7/tools/arm-mbed-cli.html) to build the project.
46

57
### Installing Visual Studio Code
68

@@ -69,3 +71,18 @@ To configure the debugger for your project:
6971
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images/vscode5.png)<span>Running the debugger</span></span>
7072

7173
<span class="tips">**Tip:** You can use the Debug Console to interact with the device over GDB and use functionality the UI does not expose. For example, to see the registers, type `-exec info registers`. To put a watch on a memory location, type `-exec watch *0xdeadbeef`.</span>
74+
75+
### Building with Mbed CLI
76+
77+
Visual Studio Code uses `make` to build your application by default. You can also build with Mbed CLI. To do this:
78+
79+
1. In `.vscode/tasks.json`, replace every instance (4 times) of `make` with `mbed`.
80+
1. In `.vscode/tasks.json`, change `args` to:
81+
82+
```
83+
"args": ["compile", "--profile=debug", "-t", "GCC_ARM", "-m", "YOUR_TARGET"],
84+
```
85+
86+
1. In `.vscode/launch.json`, replace every instance (twice) of `make` with `mbed`.
87+
1. In `.vscode/launch.json`, change `${workspaceRoot}/BUILD/` (twice) to `${workspaceRoot}/BUILD/YOUR_TARGET/GCC_ARM/`.
88+
1. In `.vscode/launch.json`, change `${workspaceRoot}\\BUILD` to `${workspaceRoot}\\BUILD\\YOUR_TARGET\\GCC_ARM`.

0 commit comments

Comments
 (0)