Hello Jakob,
Here is a workflow that enables debugging in vscode on macOS/Arm using the CodeLLDB debugger:
The gn clean command removes all files and directories except for build.ninja, build.ninja.d and
args.gn```
$ cd v8
$ gn clean out/arm64.debug
```
To ensure the `
args.gn` file is present, write it like so to ensure debugging is enabled.
```
$ cat << EOF > out/arm64.debug/
args.gn is_debug=true
enable_dsyms=true
v8_optimized_debug=false
target_cpu="arm64"
v8_target_cpu="arm64"
is_component_build=true
EOF
```
Generate ninja build files.
```
$ gn -v gen out/arm64.debug
```
Spot check that it has one of our settings. Note, this is an override from default setting of false. (I don't know how but I would like to be able to verify all settings with one command.)
```
$ gn args out/arm64.debug --list=enable_dsyms
```
Proceed with build.
```
$ ninja -v -C out/arm64.debug
```
Thanks again Jakob for pointing out the v8_optimized_debug setting. That disabled optimization (-O0) and prompted me to find the enable_dsyms setting.