From e310d144c91c78404456400a164756b1402e4d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 25 Sep 2026 12:35:41 -0600 Subject: [PATCH] Headless: Don't end a --debugger-run run when the CPU stops A stop ended the run unless the CPU had been told to break at start, which is only --debugger. So under --debugger-run, pausing from the debugger (or any breakpoint) exited the process. Key it on whether the debugger is on instead. Co-Authored-By: Claude Opus 5.5 (1M context) --- headless/Headless.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 9e6c057c0b..812dfa5203 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -328,6 +328,8 @@ struct AutoTestOptions { // sceMpeg and sceMp4 run the firmware module by default now and fall back to the HLE wherever // none is installed, which must not fail every run on such a machine. int requiredDisableHLE; + // The WebSocket debugger is on (--debugger or --debugger-run), so a stop is its to resume. + bool debugger; }; // Ends a frame of the draw context the way the app does, presenting it. Unpresented frames never @@ -482,7 +484,8 @@ static bool RunAutoTest(GraphicsContext *graphicsContext, CoreParameter &corePar gpu->BeginHostFrame(g_Config.GetDisplayLayoutConfig(DeviceOrientation::Landscape)); } } - if (coreState == CORE_STEPPING_CPU && !coreParameter.startBreak) { + // Without a debugger nothing can resume a stop, so it ends the run. + if (coreState == CORE_STEPPING_CPU && !opt.debugger) { break; } bool debugger = false; @@ -728,6 +731,7 @@ int main(int argc, const char* argv[]) { testOptions.printEqualLines = cmdLineOptions.printEqualLines.value_or(false); testOptions.maxScreenshotError = cmdLineOptions.maxScreenshotError.value_or(0.0); testOptions.requiredDisableHLE = cmdLineOptions.disableHLE.value_or(0); + testOptions.debugger = cmdLineOptions.DebuggerPort().has_value(); bool fullLog = cmdLineOptions.enableLogging.value_or(false); const char *stateToLoad = cmdLineOptions.stateToLoad.has_value() ? cmdLineOptions.stateToLoad.value().c_str() : nullptr;