diff --git a/Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/troubleshooting.md b/Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/troubleshooting.md index dbe447522..3e5bdd482 100644 --- a/Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/troubleshooting.md +++ b/Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/troubleshooting.md @@ -95,4 +95,4 @@ interrupt the flow or ask the user about it mid-run. At the next stopping point propose `uloop set-code-optimization debug --startup` (session-only without `--startup`), and only apply it if the user approves. -The automatic Debug switch changes only the current project's code optimization for this Editor session; it reverts on every Editor restart, and each re-switch costs a full script recompile. `uloop set-code-optimization debug --startup` makes Debug the startup default through a machine-wide Unity preference that applies to every project. Only the project's C# scripts run slower, mainly in Play Mode - the Editor itself is not slowed. +The automatic Debug switch changes the code optimization of this Editor session only; on every Editor restart it goes back to the 'Code Optimization On Startup' preference (a per-user Unity preference, Release unless changed), and each re-switch costs a full script recompile. `uloop set-code-optimization debug --startup` makes Debug the startup default through a machine-wide Unity preference that applies to every project. Only the project's C# scripts run slower, mainly in Play Mode - the Editor itself is not slowed. diff --git a/Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointConstants.cs b/Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointConstants.cs index 02466dc35..c16fba148 100644 --- a/Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointConstants.cs +++ b/Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointConstants.cs @@ -246,8 +246,9 @@ internal static class SourcePausePointConstants // not to correct the path or the line syntax as RESOLVE_FAILED asks. public const string ErrorCodePausePointLineNotCompiled = "PAUSE_POINT_LINE_NOT_COMPILED"; - // Why: Debug mode is lost on every Editor restart (including uloop launch -r), so the - // recovery steps must remind callers to re-switch after restart rather than only once. + // Why: Debug mode goes back to the 'Code Optimization On Startup' preference on every + // Editor restart (including uloop launch -r), so the recovery steps must remind callers + // to re-switch after restart rather than only once. public const string ReleaseCodeOptimizationRecommendedNextAction = "Automatic Debug switch and recompile did not succeed. Confirm Code Optimization is Debug " + "(the bug icon in the main toolbar), run uloop compile, then retry enable-pause-point. " diff --git a/cli/project-runner/internal/projectrunner/pause_point_release_recovery.go b/cli/project-runner/internal/projectrunner/pause_point_release_recovery.go index b272c5cc5..a1c55437f 100644 --- a/cli/project-runner/internal/projectrunner/pause_point_release_recovery.go +++ b/cli/project-runner/internal/projectrunner/pause_point_release_recovery.go @@ -16,7 +16,7 @@ import ( const pausePointReleaseCodeOptimizationErrorCode = "PAUSE_POINT_RELEASE_CODE_OPTIMIZATION" -const pausePointAutoDebugSwitchWarning = "Code Optimization was Release; switched to Debug and recompiled before arming the pause point. This setting reverts on every Editor restart, and each re-switch costs a full script recompile. Once the current task reaches a natural stopping point, suggest making Debug permanent: with the user's approval, run uloop set-code-optimization debug --startup (machine-wide: applies to every Unity project on this machine; only your project's C# script execution slows down, mainly during Play Mode - the Unity Editor itself is not slowed)." +const pausePointAutoDebugSwitchWarning = "Code Optimization was Release; switched to Debug and recompiled before arming the pause point. On every Editor restart the setting goes back to the 'Code Optimization On Startup' preference (Release unless that preference was changed), and each re-switch costs a full script recompile. Once the current task reaches a natural stopping point, suggest making Debug permanent: with the user's approval, run uloop set-code-optimization debug --startup (machine-wide: applies to every Unity project on this machine; only your project's C# script execution slows down, mainly during Play Mode - the Unity Editor itself is not slowed)." const pausePointRecoveryCompileBusyRetryInterval = 2 * time.Second diff --git a/cli/project-runner/internal/projectrunner/pause_point_release_recovery_test.go b/cli/project-runner/internal/projectrunner/pause_point_release_recovery_test.go index 1a47cfd35..a45489571 100644 --- a/cli/project-runner/internal/projectrunner/pause_point_release_recovery_test.go +++ b/cli/project-runner/internal/projectrunner/pause_point_release_recovery_test.go @@ -15,7 +15,7 @@ import ( // Verifies the automatic Debug-switch warning gives the exact approved persistence guidance. func TestPausePointAutoDebugSwitchWarningRecommendsApprovedStartupCommand(t *testing.T) { - const expected = "Code Optimization was Release; switched to Debug and recompiled before arming the pause point. This setting reverts on every Editor restart, and each re-switch costs a full script recompile. Once the current task reaches a natural stopping point, suggest making Debug permanent: with the user's approval, run uloop set-code-optimization debug --startup (machine-wide: applies to every Unity project on this machine; only your project's C# script execution slows down, mainly during Play Mode - the Unity Editor itself is not slowed)." + const expected = "Code Optimization was Release; switched to Debug and recompiled before arming the pause point. On every Editor restart the setting goes back to the 'Code Optimization On Startup' preference (Release unless that preference was changed), and each re-switch costs a full script recompile. Once the current task reaches a natural stopping point, suggest making Debug permanent: with the user's approval, run uloop set-code-optimization debug --startup (machine-wide: applies to every Unity project on this machine; only your project's C# script execution slows down, mainly during Play Mode - the Unity Editor itself is not slowed)." if pausePointAutoDebugSwitchWarning != expected { t.Fatalf("warning = %q, want %q", pausePointAutoDebugSwitchWarning, expected) } diff --git a/docs/soak-testing.md b/docs/soak-testing.md index 013e6bd67..3acc06cde 100644 --- a/docs/soak-testing.md +++ b/docs/soak-testing.md @@ -169,7 +169,8 @@ mode at setup, switches it to Debug if needed, and restores the original mode when the run ends. The mode does **not** survive `uloop launch -r`: an editor restarted mid-soak -comes back on the project's own setting, measured going from Debug to Release +comes back on the per-user 'Code Optimization On Startup' preference (Unity's +EditorPrefs, Release unless changed), measured going from Debug to Release across one restart. Debug is therefore re-applied after every scheduled and recovery restart, the same way the soak scene is rebuilt there. Both switches trigger a full recompile — the setup compile absorbs the first one by retrying past `Compilation is already in progress`,