Load debugpy when possible to allow python debugging in-program

This commit is contained in:
baldurk
2026-08-13 17:46:39 +01:00
parent 53e5e718b1
commit d71827d6a1
11 changed files with 523 additions and 6 deletions
+4
View File
@@ -1074,6 +1074,8 @@ void PythonShell::RunScript()
enableButtons(false);
LambdaThread *thread = new LambdaThread([this, script, context]() {
PythonContext::AddDebuggableThread();
scriptContext = context;
context->executeString(lit("script.py"), script);
scriptContext = NULL;
@@ -1082,6 +1084,8 @@ void PythonShell::RunScript()
context->Finish();
enableButtons(true);
});
PythonContext::RemoveDebuggableThread();
});
thread->setName(lit("Python script"));