Skip to content

Commit d55db7b

Browse files
authored
Adds VS Code debug configs for gdb and Chrome
Provides ready-to-use launch/attach profiles for native (gdb) and browser (Chrome) debugging in VS Code. Enables pretty-printing and Intel disassembly for clearer C++ debugging, and streamlines frontend debugging via Chrome with sensible defaults. Reduces setup friction and speeds up local development across backend and frontend.
1 parent c9ba8dd commit d55db7b

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.vscode/launch.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,72 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "(gdb) Launch",
9+
"type": "cppdbg",
10+
"request": "launch",
11+
"program": "enter program name, for example ${workspaceFolder}/a.out",
12+
"args": [],
13+
"stopAtEntry": false,
14+
"cwd": "${fileDirname}",
15+
"environment": [],
16+
"externalConsole": false,
17+
"MIMode": "gdb",
18+
"setupCommands": [
19+
{
20+
"description": "Enable pretty-printing for gdb",
21+
"text": "-enable-pretty-printing",
22+
"ignoreFailures": true
23+
},
24+
{
25+
"description": "Set Disassembly Flavor to Intel",
26+
"text": "-gdb-set disassembly-flavor intel",
27+
"ignoreFailures": true
28+
}
29+
]
30+
},
31+
{
32+
"name": "(gdb) Attach",
33+
"type": "cppdbg",
34+
"request": "attach",
35+
"program": "enter program name, for example ${workspaceFolder}/a.out",
36+
"MIMode": "gdb",
37+
"setupCommands": [
38+
{
39+
"description": "Enable pretty-printing for gdb",
40+
"text": "-enable-pretty-printing",
41+
"ignoreFailures": true
42+
},
43+
{
44+
"description": "Set Disassembly Flavor to Intel",
45+
"text": "-gdb-set disassembly-flavor intel",
46+
"ignoreFailures": true
47+
}
48+
]
49+
},
50+
51+
52+
53+
54+
{
55+
"name": "Launch Chrome",
56+
"request": "launch",
57+
"type": "chrome",
58+
"url": "http://localhost:8080",
59+
"webRoot": "${workspaceFolder}"
60+
},
61+
{
62+
"name": "Attach to Chrome",
63+
"port": 9222,
64+
"request": "attach",
65+
"type": "chrome",
66+
"webRoot": "${workspaceFolder}"
67+
},
68+
69+
70+
71+
72+
773

874

975
{

0 commit comments

Comments
 (0)