Skip to content

Commit d0f7b30

Browse files
committed
Check debugger enablement when guessing
Fix microsoft#133957
1 parent fc7adcf commit d0f7b30

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/vs/workbench/contrib/debug/browser/debugAdapterManager.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ export class AdapterManager extends Disposable implements IAdapterManager {
300300
if (language) {
301301
languageLabel = this.modeService.getLanguageName(language);
302302
}
303-
const adapters = this.debuggers.filter(a => language && a.languages && a.languages.indexOf(language) >= 0);
303+
const adapters = this.debuggers
304+
.filter(a => this.isDebuggerEnabled(a))
305+
.filter(a => language && a.languages && a.languages.indexOf(language) >= 0);
304306
if (adapters.length === 1) {
305307
return adapters[0];
306308
}
@@ -313,7 +315,9 @@ export class AdapterManager extends Disposable implements IAdapterManager {
313315
// Or if a breakpoint can be set in the current file (good hint that an extension can handle it)
314316
if ((!languageLabel || gettingConfigurations || (model && this.canSetBreakpointsIn(model))) && candidates.length === 0) {
315317
await this.activateDebuggers('onDebugInitialConfigurations');
316-
candidates = this.debuggers.filter(dbg => dbg.hasInitialConfiguration() || dbg.hasConfigurationProvider());
318+
candidates = this.debuggers
319+
.filter(a => this.isDebuggerEnabled(a))
320+
.filter(dbg => dbg.hasInitialConfiguration() || dbg.hasConfigurationProvider());
317321
}
318322

319323
candidates.sort((first, second) => first.label.localeCompare(second.label));

0 commit comments

Comments
 (0)