{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
// Pipe Launch calls waf with appropriate arguments
"name": "(gdb) Pipe Launch",
"type": "cppdbg",
"request": "launch",
// my build folder is ${workspaceFolder}/build, substitute yours
"program": "${workspaceFolder}/build/utils/ns3-dev-test-runner-debug",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"pipeTransport": {
"debuggerPath": "", // leave blank
"pipeProgram": "${workspaceFolder}/waf",
// pipeArgs is essentially the entire waf command line arguments
"pipeArgs": [
"--command-template", "'", // opening quote for command template
"/usr/bin/gdb", "--interpreter=mi", // --interpreter lets vscode talk to gdb
"--args", "%s",
"--suite=<test-suite>", // must specify test suite here
//"--verbose'", // I don't think this will work in pipe mode, maybe
"'", // closing quote for command template
"--run", "test-runner"],
"pipeCwd": ""
},
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
// Launch config emulates waf environment, calls gdb directly
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
// my build folder is ${workspaceFolder}/build, substitute yours
"program": "${workspaceFolder}/build/utils/ns3-dev-test-runner-debug",
"args": [
"--suite=<test-suite>" // specify test suite
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
// replace the values below with those found from running
// $ waf shell
// $ env
"environment": [
//{"Name": "NS_LOG", "Value": "Debug"}],
{"Name": "PYTHONPATH", "Value": "<from waf shell>"},
{"Name": "LD_LIBRARY_PATH", "Value": "<from waf shell>"},
{"Name": "NS3_MODULE_PATH", "Value": "<from waf shell>"},
{"Name": "NS3_EXECUTABLE_PATH", "Value": "<from waf shell>"},
{"Name": "PATH", "Value": "<from waf shell>"}
],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"logging": {
"engineLogging" :true,
"trace": true
}
}
]
}