Skip to content

fix: The Debug-switch warning says the setting goes back to the startup preference, not that it reverts - #3237

Merged
hatayama merged 3 commits into
feature/hot-reload-large-project-feedback-3from
fix/debug-switch-warning-startup-preference
Oct 7, 2026
Merged

hatayama merged 3 commits into
feature/hot-reload-large-project-feedback-3from
fix/debug-switch-warning-startup-preference

Conversation

@hatayama

@hatayama hatayama commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • When enabling a pause point switches a Release Editor to Debug, the warning no longer says the setting "reverts on every Editor restart". It now says that on restart the setting goes back to Unity's 'Code Optimization On Startup' preference, which is Release unless it was changed.
  • The pause-point troubleshooting reference, the soak-testing doc, and one code comment say the same.

Why

  • Unity's reference source shows:
    • Setting CompilationPipeline.codeOptimization changes only the native value for the current session. It writes neither EditorPrefs nor the project.
    • The value at startup comes from the EditorPrefs key ScriptDebugInfoEnabled, shown in Preferences as 'Code Optimization On Startup'. It is a per-user setting, not a project setting, and it defaults to false (Release).
    • uloop set-code-optimization debug --startup writes that same key.
  • So a restart does not go back to Release; it goes back to the startup preference. A trial user finished two sessions in Release and still found the Editor in Debug after uloop launch -r, which matches a startup preference of Debug. "Reverts" read as "goes back to Release".

Changes

  • The automatic Debug-switch warning in the project runner: "This setting reverts on every Editor restart, ..." becomes "On every Editor restart the setting goes back to the 'Code Optimization On Startup' preference (Release unless that preference was changed), ...". The rest of the warning is unchanged.
  • The pause-point troubleshooting reference: the switch changes this Editor session only, and a restart goes back to the per-user startup preference.
  • docs/soak-testing.md: a restarted Editor comes back on the per-user startup preference, not "the project's own setting".
  • A code comment beside the Editor-side recovery message, which already used the correct wording.

Verification

  • Red first: with only the test's expected text changed, go -C cli/project-runner test ./internal/projectrunner -run 'TestPausePointAutoDebugSwitchWarningRecommendsApprovedStartupCommand' -count=1 failed on the mismatch. With the constant changed, it passed.
  • gofmt -l cli/project-runner: no output. go -C cli/project-runner vet ./...: exit 0. golangci-lint run ./... in cli/project-runner: 0 issues.
  • git grep -n "reverts on every Editor restart\|project's own setting\|lost on every Editor restart" -- cli Packages docs: no matches.

This pull request targets an integration branch, so the pull request CI does not run on it; the checks above were run locally.

Not changed

  • Behavior: when and how the Debug switch happens.
  • The Editor-side recovery message, which already says the setting reverts to the 'Code Optimization On Startup' preference.
  • The set-code-optimization wording "for this Editor session" and its command description.

View guided diff

Unity restores the Code Optimization On Startup preference on restart,
a per-user setting that may itself be Debug, so saying the setting
reverts misleads readers into expecting Release.
The session value set through CompilationPipeline is replaced at startup
by the per-user Code Optimization On Startup preference, which defaults
to Release but may be Debug, so the warning now names that preference
instead of saying the setting reverts.
…erence

The skill reference, the soak-testing doc, and a code comment said the
setting reverts, is lost, or returns to the project's setting. Unity
restores the per-user Code Optimization On Startup preference instead,
which can itself be Debug.
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: hatayama/unity-cli-loop/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 66f810c2-710d-4d4d-9543-34eeb56ab4f5
📥 Commits

Reviewing files that changed from the base of the PR and between d872b6d and e3d83b3.

📒 Files selected for processing (5)
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/troubleshooting.md
  • Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointConstants.cs
  • cli/project-runner/internal/projectrunner/pause_point_release_recovery.go
  • cli/project-runner/internal/projectrunner/pause_point_release_recovery_test.go
  • docs/soak-testing.md
 _______________________________________________________________________________________________________________________________________________
< Costly tools don't produce better designs. Beware of vendor hype, industry dogma, and the aura of the price tag. Judge tools on their merits. >
 -----------------------------------------------------------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hatayama
hatayama merged commit ea9d692 into feature/hot-reload-large-project-feedback-3 Oct 7, 2026
4 of 5 checks passed
@hatayama
hatayama deleted the fix/debug-switch-warning-startup-preference branch October 7, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant