GDB/LLDB debugger pretty printers w/QString support and vscode launch config (#18960)

* GDB/LLDB debugger pretty printers w/QString support and vscode launch  config

* Python code now adheres to pep8.  Slight refactor to lldb printer for readability.

* Resolved a few missed trailing whitespace errors from pylint

* Added missing trailing newline I missed in my last commit

* Apply suggestions from code review

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
This commit is contained in:
Boots
2025-01-20 12:55:20 -04:00
committed by GitHub
parent 5e3eab1b97
commit 14319a31f8
3 changed files with 275 additions and 4 deletions

View File

@@ -16,10 +16,30 @@
],
"linux": {
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb"
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
{
"description": "Load QT pretty-printers for GDB",
"text": "python import sys; sys.path.append('${workspaceFolder}/contrib/debugger'); from qt_pretty_printers_gdb import register_qt_printers; register_qt_printers()",
"ignoreFailures": false
},
{
"description": "Enable pretty-printing for GDB",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
},
"osx": {
"MIMode": "lldb"
"MIMode": "lldb",
"preRunCommands": [
"command script import ${workspaceFolder}/contrib/debugger/qt_pretty_printers_lldb.py"
]
},
"stopAtEntry": false,
"externalConsole": false,
@@ -47,10 +67,30 @@
],
"linux": {
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb"
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
{
"description": "Load QT pretty-printers for GDB",
"text": "python import sys; sys.path.append('${workspaceFolder}/contrib/debugger'); from qt_pretty_printers_gdb import register_qt_printers; register_qt_printers()",
"ignoreFailures": false
},
{
"description": "Enable pretty-printing for GDB",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
},
"osx": {
"MIMode": "lldb"
"MIMode": "lldb",
"preRunCommands": [
"command script import ${workspaceFolder}/contrib/debugger/qt_pretty_printers_lldb.py"
]
},
"stopAtEntry": false,
"externalConsole": false,