Created
September 7, 2024 04:59
-
-
Save samcamwilliams/11b108ee358ad7f5fb176a1cc259389e to your computer and use it in GitHub Desktop.
Run rebar3 + Erlang in debug mode inside VS Code for LLDB debugging. This is useful for debugging linked-in drivers (and possibly NIFs, too). It is a ghastly construction, but it works (assuming you update the paths of course). The '--' twice is very strange but necessary. It seems that both lldb and Erlang using '--' as a signifier for their ar…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "(lldb) Launch", | |
"type": "cppdbg", | |
"request": "launch", | |
"program": "${workspaceFolder}/../otp/bin/aarch64-apple-darwin22.6.0/beam.debug.smp", | |
"args": [ | |
"--", "--", | |
"-a", "256", | |
"-root", "${workspaceFolder}/../otp/", | |
"-bindir", "${workspaceFolder}/../otp/bin/aarch64-apple-darwin22.6.0/", | |
"-home", "$HOME", | |
"-pz", "/Users/sam/.cache/rebar3/vsns/3.24.0/lib/bbmustache/ebin", | |
"/Users/sam/.cache/rebar3/vsns/3.24.0/lib/certifi/ebin", | |
"/Users/sam/.cache/rebar3/vsns/3.24.0/lib/cf/ebin", | |
"/Users/sam/.cache/rebar3/vsns/3.24.0/lib/cth_readable/ebin", | |
"/Users/sam/.cache/rebar3/vsns/3.24.0/lib/erlware_commons/ebin", | |
"/Users/sam/.cache/rebar3/vsns/3.24.0/lib/eunit_formatters/ebin", | |
"/Users/sam/.cache/rebar3/vsns/3.24.0/lib/getopt/ebin", | |
"/Users/sam/.cache/rebar3/vsns/3.24.0/lib/providers/ebin", | |
"/Users/sam/.cache/rebar3/vsns/3.24.0/lib/rebar/ebin", | |
"/Users/sam/.cache/rebar3/vsns/3.24.0/lib/relx/ebin", | |
"/Users/sam/.cache/rebar3/vsns/3.24.0/lib/ssl_verify_fun/ebin", | |
"-boot", "no_dot_erlang", "-noshell", | |
"-run", "rebar3", "main", "shell" | |
], | |
"cwd": "${workspaceFolder}", | |
"environment": [ | |
{ "name": "BINDIR", "value": "${workspaceFolder}/../otp/bin/aarch64-apple-darwin22.6.0/" } | |
], | |
"targetArchitecture": "arm64", | |
"MIMode": "lldb", | |
"logging": { | |
"moduleLoadTimeout": 10000 | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment