diff --git a/qrenderdoc/Windows/Dialogs/ExtensionManager.cpp b/qrenderdoc/Windows/Dialogs/ExtensionManager.cpp index dd1d71535..128d9be0e 100644 --- a/qrenderdoc/Windows/Dialogs/ExtensionManager.cpp +++ b/qrenderdoc/Windows/Dialogs/ExtensionManager.cpp @@ -298,7 +298,11 @@ void ExtensionManager::update_currentItem(RDTreeWidgetItem *item) ui->reload->setEnabled(true); ui->reload->setText(loaded ? tr("Reload") : tr("Load")); ui->output->setEnabled(loaded); - ui->debug->setEnabled(loaded); + ui->debug->setEnabled(loaded && PythonContext::IsDebuggingEnabled()); + ui->debug->setToolTip(QString()); + if(loaded && !PythonContext::IsDebuggingEnabled()) + ui->debug->setToolTip( + tr("Debugging not supported - check documentation for setup instructions")); ui->alwaysLoad->setEnabled(loaded); ui->alwaysLoad->setChecked(m_Ctx.Config().AlwaysLoad_Extensions.contains(e.package)); diff --git a/qrenderdoc/Windows/PythonShell.cpp b/qrenderdoc/Windows/PythonShell.cpp index be510fa0c..c3d8ba0cb 100644 --- a/qrenderdoc/Windows/PythonShell.cpp +++ b/qrenderdoc/Windows/PythonShell.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include "Code/QRDUtils.h" #include "Code/ScintillaSyntax.h" #include "Code/pyrenderdoc/PythonContext.h" @@ -1086,6 +1087,16 @@ PythonShell::PythonShell(ICaptureContext &ctx, QWidget *parent) // reset output to default on_clear_clicked(); on_newScript_clicked(); + + // we defer debugging loading onto a thread so check after a delay + QTimer::singleShot(1200, [this]() { + if(!PythonContext::IsDebuggingEnabled()) + { + ui->debugScript->setEnabled(false); + ui->debugScript->setToolTip( + tr("Debugging not supported - check documentation for setup instructions")); + } + }); } PythonShell::~PythonShell()