README.md
1# Trusty VSCode Support
2
3## Quickstart
4
5Once you have VSCode installed, open the Trusty code base in VSCode and create a
6`.vscode` folder in the root (it may already exist if you've adjusted any
7settings). This folder is needed to tell the install script where the VSCode
8workspace begins.
9
10Next run the install script:
11
12```shell
13$ ./trusty/vendor/google/aosp/ide/vscode/install.sh
14```
15
16This will configure VSCode to understand how to start up Trusty in the emulator
17and attach the debugger.
18
19## Building
20
21The configuration files that are provided do not build Trusty for you. You'll
22need to do that on the command line:
23
24```shell
25$ ./trusty/vendor/google/aosp/scripts/build.py --skip-tests qemu-generic-arm64-test-debug
26```
27
28## Debugging
29
30Before starting, go ahead and set your breakpoints by clicking to the left of
31the line number in a file. You can do this for kernel code as well as TA code.
32Because our integration with LLDB is hacky, the debugger will lose track of a
33process after syscalls are made. You'll need to add breakpoints after each
34syscall to step past them.
35
36As long as you've built the `qemu-generic-arm64-test-debug` Trusty project
37you can switch to the Run/Debug view (View > Run) and click the button that says
38`Debug with Prebuilt`.
39
40Now you're debugging like a pro.
41