Add switch to select the build type in VSCode debug

Tommaso Pecorella 2022-11-27 15:57:48 +01:00 committed by Tommaso Pecorella
parent bd2dde6c48
commit a6337446a5
1 changed files with 19 additions and 4 deletions

23
.vscode/launch.json vendored
View File

@ -8,7 +8,7 @@
"name": "(gdb) Launch from scratch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/${relativeFileDirname}/ns3-dev-${fileBasenameNoExtension}-default",
"program": "${workspaceFolder}/build/${relativeFileDirname}/ns3-dev-${fileBasenameNoExtension}-${input:buildType}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
@ -33,7 +33,7 @@
"name": "(lldb) Launch from scratch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/${relativeFileDirname}/ns3-dev-${fileBasenameNoExtension}-default",
"program": "${workspaceFolder}/build/${relativeFileDirname}/ns3-dev-${fileBasenameNoExtension}-${input:buildType}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
@ -51,7 +51,7 @@
"name": "(gdb) Launch testrunner",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/utils/ns3-dev-test-runner-debug",
"program": "${workspaceFolder}/build/utils/ns3-dev-test-runner-${input:buildType}",
"args": [
"--suite=${selectedText}"
],
@ -78,7 +78,7 @@
"name": "(lldb) Launch testrunner",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/utils/ns3-dev-test-runner-debug",
"program": "${workspaceFolder}/build/utils/ns3-dev-test-runner-${input:buildType}",
"args": [
"--suite=${selectedText}"
],
@ -94,5 +94,20 @@
"externalConsole": false,
"MIMode": "lldb"
}
],
"inputs": [
{
"type": "pickString",
"id": "buildType",
"description": "What is the build option?",
"options": [
"debug",
"default",
"optimized",
"release",
"minsizerel"
],
"default": "default"
}
]
}