mirror of
https://github.com/RubyMetric/chsrc
synced 2025-09-08 16:46:56 +08:00
优化 VS Code DEBUG 设置 (#270)
This commit is contained in:
parent
fd21308870
commit
981a191de8
9
.vscode/launch.json
vendored
9
.vscode/launch.json
vendored
@ -8,13 +8,15 @@
|
|||||||
"program": "${workspaceFolder}/chsrc-debug",
|
"program": "${workspaceFolder}/chsrc-debug",
|
||||||
"args": [
|
"args": [
|
||||||
"get",
|
"get",
|
||||||
"python"
|
"nodejs"
|
||||||
],
|
],
|
||||||
"preLaunchTask": "构建 debug 版 chsrc",
|
"preLaunchTask": "构建 debug 版 chsrc",
|
||||||
"stopAtEntry": true,
|
"stopAtEntry": true,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"environment": [],
|
"environment": [],
|
||||||
"externalConsole": false,
|
// 如果你认为使用弹出窗口难以调试,可尝试设置为false
|
||||||
|
"externalConsole": true,
|
||||||
|
// lldb 等请自行设置,不作额外说明
|
||||||
"MIMode": "gdb",
|
"MIMode": "gdb",
|
||||||
// "miDebuggerPath": "/path/to/gdb",
|
// "miDebuggerPath": "/path/to/gdb",
|
||||||
"setupCommands": [
|
"setupCommands": [
|
||||||
@ -28,7 +30,8 @@
|
|||||||
"text": "-gdb-set disassembly-flavor intel",
|
"text": "-gdb-set disassembly-flavor intel",
|
||||||
"ignoreFailures": true
|
"ignoreFailures": true
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"postDebugTask": "停止 debug 程序"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
76
.vscode/tasks.json
vendored
76
.vscode/tasks.json
vendored
@ -17,7 +17,8 @@
|
|||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
},
|
},
|
||||||
"detail": "使用 just build 编译"
|
"dependsOn": "停止程序",
|
||||||
|
"detail": "先停止原有程序,然后使用 just build 编译"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
@ -36,7 +37,6 @@
|
|||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": false
|
"isDefault": false
|
||||||
},
|
},
|
||||||
"detail": "使用 just build-in-debug-mode 编译 debug 版"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
@ -94,6 +94,78 @@
|
|||||||
"isDefault": false
|
"isDefault": false
|
||||||
},
|
},
|
||||||
"detail": "使用 just test-xy 测试 xy.h"
|
"detail": "使用 just test-xy 测试 xy.h"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "停止 debug 程序",
|
||||||
|
"windows": {
|
||||||
|
"command": "powershell",
|
||||||
|
"args": [
|
||||||
|
"-c",
|
||||||
|
"Get-Process -Name \"chsrc-debug\" -ErrorAction SilentlyContinue | Stop-Process -Force;",
|
||||||
|
"Get-Process -Name \"gdb\" -ErrorAction SilentlyContinue | Stop-Process -Force;",
|
||||||
|
"Get-Process -Name \"WindowsDebugLauncher\" -ErrorAction SilentlyContinue | Stop-Process -Force;"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"command": "bash",
|
||||||
|
"args": [
|
||||||
|
"-c",
|
||||||
|
"if pgrep -f chsrc-debug > /dev/null; then pkill -f chsrc-debug; fi"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"osx": {
|
||||||
|
"command": "bash",
|
||||||
|
"args": [
|
||||||
|
"-c",
|
||||||
|
"if pgrep -f chsrc-debug > /dev/null; then pkill -f chsrc-debug; fi"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"group": "build",
|
||||||
|
"presentation": {
|
||||||
|
"echo": true,
|
||||||
|
"reveal": "silent",
|
||||||
|
"focus": false,
|
||||||
|
"panel": "shared",
|
||||||
|
"showReuseMessage": true,
|
||||||
|
"clear": false
|
||||||
|
},
|
||||||
|
"detail": "停止 debug 版本的 chsrc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "停止程序",
|
||||||
|
"windows": {
|
||||||
|
"command": "powershell",
|
||||||
|
"args": [
|
||||||
|
"-c",
|
||||||
|
"Get-Process -Name \"chsrc\" -ErrorAction SilentlyContinue | Stop-Process -Force;"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"command": "bash",
|
||||||
|
"args": [
|
||||||
|
"-c",
|
||||||
|
"if pgrep -f chsrc > /dev/null; then pkill -f chsrc; fi"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"osx": {
|
||||||
|
"command": "bash",
|
||||||
|
"args": [
|
||||||
|
"-c",
|
||||||
|
"if pgrep -f chsrc > /dev/null; then pkill -f chsrc; fi"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"group": "build",
|
||||||
|
"presentation": {
|
||||||
|
"echo": true,
|
||||||
|
"reveal": "always",
|
||||||
|
"focus": false,
|
||||||
|
"panel": "shared",
|
||||||
|
"showReuseMessage": true,
|
||||||
|
"clear": false
|
||||||
|
},
|
||||||
|
"detail": "跨平台停止 chsrc"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version": "2.0.0"
|
"version": "2.0.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user