Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
3 changes: 2 additions & 1 deletion docs/soak-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
Loading