Load debugpy when possible to allow python debugging in-program

This commit is contained in:
baldurk committed 2026-08-13 17:46:39 +01:00
1 parent 53e5e718b1
commit d71827d6a1
11 files changed
+523 -6

No files matched your search

@@ -307,6 +307,10 @@ SettingsDialog::SettingsDialog(ICaptureContext &ctx, QWidget *parent)
ui->EventBrowser_ApplyColors->setChecked(m_Ctx.Config().EventBrowser_ApplyColors);
ui->EventBrowser_ColorEventRow->setChecked(m_Ctx.Config().EventBrowser_ColorEventRow);
ui->Python_DebugEnabled->setChecked(m_Ctx.Config().Python_DebugEnabled);
ui->Python_DebugPyDir->setText(m_Ctx.Config().Python_DebugPyDir);
ui->Comments_ShowOnLoad->setChecked(m_Ctx.Config().Comments_ShowOnLoad);
ui->Formatter_MinFigures->setValue(m_Ctx.Config().Formatter_MinFigures);
@@ -845,6 +849,35 @@ void SettingsDialog::on_Python_StubPaths_clicked()
}
}
void SettingsDialog::on_Python_DebugPyDirBrowse_clicked()
{
QString dir = RDDialog::getExistingDirectory(this, tr("Choose location of debugpy module"),
m_Ctx.Config().Python_DebugPyDir);
if(!dir.isEmpty() && QDir(dir).exists() && QDir(dir).exists(lit("__init__.py")))
{
m_Ctx.Config().Python_DebugPyDir = dir;
ui->Python_DebugPyDir->setText(dir);
}
m_Ctx.Config().Save();
}
void SettingsDialog::on_Python_DebugPyDir_textEdited(const QString &dir)
{
if((QDir(dir).exists() && QDir(dir).exists(lit("__init__.py"))) || dir.isEmpty())
m_Ctx.Config().Python_DebugPyDir = dir;
m_Ctx.Config().Save();
}
void SettingsDialog::on_Python_DebugEnabled_toggled(bool checked)
{
m_Ctx.Config().Python_DebugEnabled = ui->Python_DebugEnabled->isChecked();
m_Ctx.Config().Save();
}
// texture viewer
void SettingsDialog::on_TextureViewer_PerTexSettings_toggled(bool checked)
{