Skip the adapter settings dialog on subsequent debug sessions - #1133
Merged
Conversation
Rework the "use same settings next time" preference so it cannot silently reuse settings across different debug operations. Instead of four independent per-operation flags, track a single preference plus the last debug-start operation (launch / attach / connect / connect to debug server). The adapter settings dialog is shown whenever the user starts an operation that differs from the last one, or when the preference asks for it. This means, for example, that choosing "use same settings" while launching never suppresses the dialog when the user later switches to attach. The "Use same settings next time" checkbox now reflects and writes this single preference, and is additionally shown in the generic Debug Adapter Settings dialog (opened from the menu) so a dialog that has been suppressed for an operation can always be re-enabled. Co-authored-by: 3rdit <llerdit@gmail.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
This is from a user PR (#1064), I reviewed it, made some changes to it, and merged it |
This was referenced Jul 24, 2026
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.
Skip the adapter settings dialog on subsequent debug sessions
Adds a "Use same settings next time" checkbox to the Debug Adapter Settings dialog. When checked, the dialog is not shown again the next time you start the debugger with the same operation, so repeated launches/attaches don't re-prompt for settings.
Supersedes #1064 — built on top of @3rdit's original work (credited as co-author). Rebased onto latest
dev.Behavior
The preference is a single flag combined with a record of the last debug-start operation (launch / attach / connect / connect-to-debug-server). The dialog is shown when:
This avoids a footgun a naive single flag would have: choosing "use same settings" while launching must not silently suppress the dialog when you later switch to attach — an operation you never configured. Because switching operations always re-prompts, suppression is always explicit and per-kind, while the only inherited direction ("show again") is harmless.
The checkbox reflects and writes this one preference. It also appears in the generic Debug Adapter Settings dialog (opened from the menu), which is the entry point for re-enabling a dialog that has been suppressed for an operation.
The preference is in-memory (per debugger session), matching the existing
IsFirstLaunch/IsFirstAttachflags.Changes
m_showAdapterSettingsNextTimeplusm_lastDebugStartOperation, recorded when each session starts. NewShouldShowAdapterSettingsFor{Launch,Attach,Connect,ConnectToDebugServer}()decision helpers and a singleShowAdapterSettingsNextTime()getter /SetShowAdapterSettingsNextTime()setter.ShouldShowAdapterSettingsFor<Op>(); checkbox writes the single preference and now also shows in the generic settings dialog (applied live, since that dialog has no OK/Cancel).Testing
Manually verified: first launch prompts; a second launch with the box checked skips the dialog; switching to attach re-prompts; unchecking the box in the generic settings dialog re-enables prompting.