forked from qt-creator/qt-creator
DAP: Fix python debug stoping
Change-Id: I49ac6d9d7164a7f74fe683840734d903643b3561 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -177,6 +177,22 @@ void PyDapEngine::handleDapInitialize()
|
|||||||
qCDebug(dapEngineLog) << "handleDapAttach";
|
qCDebug(dapEngineLog) << "handleDapAttach";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PyDapEngine::quitDebugger()
|
||||||
|
{
|
||||||
|
showMessage(QString("QUIT DEBUGGER REQUESTED IN STATE %1").arg(state()));
|
||||||
|
startDying();
|
||||||
|
|
||||||
|
// Temporary workaround for Python debugging instability, particularly
|
||||||
|
// in conjunction with PySide6, due to unreliable pause functionality.
|
||||||
|
if (state() == InferiorRunOk) {
|
||||||
|
setState(InferiorStopRequested);
|
||||||
|
notifyInferiorStopOk();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DebuggerEngine::quitDebugger();
|
||||||
|
}
|
||||||
|
|
||||||
void installDebugpyPackage(const FilePath &pythonPath)
|
void installDebugpyPackage(const FilePath &pythonPath)
|
||||||
{
|
{
|
||||||
CommandLine cmd{pythonPath, {"-m", "pip", "install", "debugpy"}};
|
CommandLine cmd{pythonPath, {"-m", "pip", "install", "debugpy"}};
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void handleDapInitialize() override;
|
void handleDapInitialize() override;
|
||||||
|
void quitDebugger() override;
|
||||||
|
|
||||||
void setupEngine() override;
|
void setupEngine() override;
|
||||||
Utils::Process m_proc;
|
Utils::Process m_proc;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user