Skip to content

Instantly share code, notes, and snippets.

@pablogsal
Created January 21, 2020 00:37
Show Gist options
  • Save pablogsal/0017f28f36e9b03292f852d2e5dd9c61 to your computer and use it in GitHub Desktop.
Save pablogsal/0017f28f36e9b03292f852d2e5dd9c61 to your computer and use it in GitHub Desktop.
{
"version": "0.2.0",
"configurations": [
// Open any Cpython test case in cpython/Lib/test
{
"name": "Cpython test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/python.exe",
"args": ["-m", "test", "-v", "${file}"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/Lib/test",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
},
// run python with -c option
{
"name": "python -c",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/python.exe",
// change the second argument accordinly
"args": ["-c", "print(\"hello\")"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
},
{
"name": "python interpretter",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/python.exe",
// change the second argument accordinly
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment