From 41b3594dfb86deb3d1e24903d9feab42291a7d8f Mon Sep 17 00:00:00 2001 From: ZhangTingan Date: Wed, 14 May 2025 09:41:07 +0800 Subject: [PATCH] fix: Adapting to QProcess Usage in Qt 6 Log: The abnormal execution of QProcess resulted in empty fuser output, causing port availability verification to fail, which ultimately led to connection failures with the correct debugging backend and freeze ide Bug: https://pms.uniontech.com/bug-view-315851.html --- src/tools/debugadapter/debugger/python/pythondebugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/debugadapter/debugger/python/pythondebugger.cpp b/src/tools/debugadapter/debugger/python/pythondebugger.cpp index 8660a260a..4b21fbd2e 100644 --- a/src/tools/debugadapter/debugger/python/pythondebugger.cpp +++ b/src/tools/debugadapter/debugger/python/pythondebugger.cpp @@ -115,7 +115,7 @@ void PythonDebugger::initialize(const QString &pythonExecute, auto checkPortFree = [](int port) { QProcess process; QString cmd = QString("fuser %1/tcp").arg(port); - process.start(cmd); + process.start("bash", {"-c", cmd}); process.waitForFinished(); QString ret = process.readAll(); if (ret.isEmpty())