mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-22 20:42:46 +08:00
Add VS Code debug launch
This commit is contained in:
parent
f312dd3b8d
commit
211e98cce1
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
||||
!.vscode/settings.json
|
||||
!.vscode/c_cpp_properties.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/README.md
|
||||
|
||||
*.o
|
||||
|
34
.vscode/launch.json
vendored
Normal file
34
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "开始Debug",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/chsrc-debug",
|
||||
"args": [
|
||||
"get",
|
||||
"python"
|
||||
],
|
||||
"preLaunchTask": "构建 debug 版 chsrc",
|
||||
"stopAtEntry": true,
|
||||
"cwd": "${fileDirname}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
// "miDebuggerPath": "/path/to/gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
17
.vscode/tasks.json
vendored
17
.vscode/tasks.json
vendored
@ -17,6 +17,23 @@
|
||||
},
|
||||
"detail": "使用 just build 编译"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "构建 debug 版 chsrc",
|
||||
"command": "just",
|
||||
"args": ["DEBUG=1", "build"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"detail": "使用 just DEBUG=1 build 编译 debug 版"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "测试 chsrc",
|
||||
|
Loading…
x
Reference in New Issue
Block a user