Skip to content

Skip the adapter settings dialog on subsequent debug sessions - #1133

Merged
xusheng6 merged 2 commits into
devfrom
feature/skip-settings-option
Jul 22, 2026
Merged

Skip the adapter settings dialog on subsequent debug sessions#1133
xusheng6 merged 2 commits into
devfrom
feature/skip-settings-option

Conversation

@xusheng6

Copy link
Copy Markdown
Member

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:

  • the operation differs from the last one you ran, or
  • the "use same settings" preference asks for it (i.e. the box was left unchecked).

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/IsFirstAttach flags.

Changes

  • core: replace the four per-operation "show next time" flags with a single m_showAdapterSettingsNextTime plus m_lastDebugStartOperation, recorded when each session starts. New ShouldShowAdapterSettingsFor{Launch,Attach,Connect,ConnectToDebugServer}() decision helpers and a single ShowAdapterSettingsNextTime() getter / SetShowAdapterSettingsNextTime() setter.
  • ffi / api: collapse the eight exported functions to six (four per-op decisions + getter + setter).
  • ui: dialog gates simplified to 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.

3rdit and others added 2 commits July 22, 2026 11:56
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>
@xusheng6
xusheng6 requested review from plafosse and removed request for plafosse July 22, 2026 17:39
@xusheng6
xusheng6 merged commit 3e46d8e into dev Jul 22, 2026
2 checks passed
@xusheng6
xusheng6 deleted the feature/skip-settings-option branch July 22, 2026 19:02
@xusheng6

Copy link
Copy Markdown
Member Author

This is from a user PR (#1064), I reviewed it, made some changes to it, and merged it

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.

2 participants