Do not open debug view on first session start when openDebug is openOnDebugBreak#309133
Merged
connor4312 merged 1 commit intomicrosoft:mainfrom Apr 13, 2026
Conversation
…openOnDebugBreak The previous condition opened the debug viewlet on first session start for any value of `debug.openDebug` other than `neverOpen`, which contradicts the `openOnDebugBreak` semantics. With `openOnDebugBreak` (the default), the view should only be revealed when a breakpoint is actually hit, which is already handled in `debugSession.ts`. Restrict the first-session-start branch to `openOnFirstSessionStart` so that `openOnDebugBreak` no longer forces the view open on initial launch. Fixes microsoft#263434
connor4312
approved these changes
Apr 13, 2026
roblourens
approved these changes
Apr 13, 2026
Contributor
|
@yogeshwaran-c thank you! 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #263434.
The default
debug.openDebugvalue isopenOnDebugBreak, which is documented as opening the debug view when the debugger breaks. However, the view also opened on the very first debug session of a window, regardless of whether a breakpoint was hit.The previous condition in
DebugService.launchOrAttachToSessionwas:The
openDebug !== 'neverOpen'check causedopenOnDebugBreak(and any other value) to fall into the first-session-start branch. The fix restricts that branch to the explicitopenOnFirstSessionStartvalue, which is what users expect when reading the setting names.openOnDebugBreakis still handled separately indebugSession.tswhen a thread stops on abreakpointreason, so behavior on actual breaks is unchanged.Test plan
debug.openDebugtoopenOnDebugBreak(the default), reload the window, and start a debug session that does not hit a breakpoint immediately. The debug view should not auto-open.debug.openDebugtoopenOnFirstSessionStartand start a debug session in a fresh window. The debug view should open.debug.openDebugtoopenOnSessionStartand start any debug session. The debug view should open.debug.openDebugtoneverOpen. The debug view should never auto-open.