添加调试
This commit is contained in:
@@ -1,18 +1,23 @@
|
||||
{
|
||||
"name": "DevContainerExample",
|
||||
|
||||
"image": "mcr.microsoft.com/devcontainers/base:dev-ubuntu-20.04",
|
||||
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y gdb && make",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {},
|
||||
"extensions": [
|
||||
]
|
||||
}
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"debug.onTaskErrors": "debugAnyway"
|
||||
},
|
||||
"extensions": [
|
||||
"ms-vscode.cpptools"
|
||||
]
|
||||
}
|
||||
},
|
||||
"portsAttributes": {
|
||||
"3000": {
|
||||
"label": "Web Server",
|
||||
"onAutoForward": "notify"
|
||||
}
|
||||
}
|
||||
}
|
||||
"3000": {
|
||||
"label": "Web Server",
|
||||
"onAutoForward": "notify"
|
||||
}
|
||||
},
|
||||
"initializeCommand": "gdb -ex 'set confirm off' -ex quit", // 初始化GDB配置
|
||||
"postAttachCommand": "make debug" // 假设你的Makefile有debug目标
|
||||
}
|
||||
Reference in New Issue
Block a user