33 lines
592 B
Markdown
33 lines
592 B
Markdown
# VSCode 调试脚本
|
|
|
|
VSCode 可以用来调试程序,通过修改 .vscode/launch.json 来支持各种调试需求。
|
|
|
|
## 1. 增加调试参数
|
|
|
|
在 "configurations" 中增加:
|
|
|
|
```json
|
|
"configurations": [
|
|
"args":[
|
|
"arg1",
|
|
"...",
|
|
"argN"
|
|
]
|
|
]
|
|
```
|
|
|
|
可在调试时增加程序入口参数。
|
|
|
|
## 2. ARM 交叉编译远程调试
|
|
|
|
在 "configurations" 中增加并修改:
|
|
|
|
```json
|
|
"program": "${YOUR/PROGRAM/FILE}",
|
|
"cwd": "${workspaceFolder}",
|
|
"linux": {
|
|
"miDebuggerPath": "${CROSS/GDB}",
|
|
},
|
|
"miDebuggerServerAddress": "${SERVER IP}:${SERVER PORT}"
|
|
```
|