Skip to content

Commit 1a52215

Browse files
committed
[IMP] add debug configurations for rust-gdb
1 parent c41dca4 commit 1a52215

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.vscode/launch.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,48 @@
2828
"cwd": "${workspaceFolder}/server",
2929
"console": "externalTerminal"
3030
},
31+
{
32+
"name": "Launch Server (gdb)",
33+
"type": "cppdbg",
34+
"request": "launch",
35+
"preLaunchTask": "cargo build",
36+
"program": "${workspaceFolder}/server/target/debug/odoo_ls_server",
37+
"args": ["--use-tcp"],
38+
"cwd": "${workspaceFolder}/server",
39+
"externalConsole": false,
40+
"MIMode": "gdb",
41+
"miDebuggerPath": "/usr/bin/rust-gdb",
42+
"setupCommands": [
43+
{
44+
"description": "Enable pretty-printing for gdb",
45+
"text": "-enable-pretty-printing",
46+
"ignoreFailures": true
47+
},
48+
]
49+
},
50+
{
51+
"name": "Debug Test (gdb)",
52+
"type": "cppdbg",
53+
"request": "launch",
54+
// Adjust the test binary name
55+
"program": "${workspaceFolder}/server/target/debug/deps/test_setup-22eac7e5dc85cac2",
56+
"args": [],
57+
"cwd": "${workspaceFolder}/server",
58+
"environment": [
59+
// Adjust this path if test requires it
60+
{ "name": "COMMUNITY_PATH", "value": "/path/to/odoo" }
61+
],
62+
"externalConsole": false,
63+
"MIMode": "gdb",
64+
"miDebuggerPath": "/usr/bin/rust-gdb",
65+
"setupCommands": [
66+
{
67+
"description": "Enable pretty-printing for gdb",
68+
"text": "-enable-pretty-printing",
69+
"ignoreFailures": true
70+
}
71+
]
72+
},
3173
{
3274
"name": "Launch Server (cppvsdbg)",
3375
"type": "cppvsdbg",

0 commit comments

Comments
 (0)