Add option to launch/wait for debugger on python contexts

This commit is contained in:
baldurk
2026-08-13 17:46:40 +01:00
parent 3dfd829331
commit 3ff393c91f
13 changed files with 315 additions and 12 deletions
@@ -373,6 +373,15 @@ DECLARE_REFLECTION_STRUCT(BugReport);
":type: bool"); \
CONFIG_SETTING_VAL(public, bool, bool, Python_DebugEnabled, true) \
\
DOCUMENT( \
"``True`` if a new instance of VS Code should be launched when debugging a python script " \
"or UI extension.\n" \
"\n" \
"Defaults to ``True``." \
"" \
":type: bool"); \
CONFIG_SETTING_VAL(public, bool, bool, Python_LaunchVSCode, true) \
\
DOCUMENT( \
"The path to an copy of the ``debugpy`` module which should be loaded for debugging." \
"" \
+7
View File
@@ -1248,6 +1248,13 @@ QWidget.
)");
virtual void RunScript() = 0;
DOCUMENT(R"(Debugs the current script in the python shell.
This runs the script but waits for a debugger to connect first before beginning. The user
will have the option to cancel, which aborts the run of the script.
)");
virtual void DebugScript() = 0;
protected:
IPythonShell() = default;
~IPythonShell() = default;