Change:
Problem: install Java debugger open a folder with no switch to debug view and press gear button Observe: it looks like nothing is happening but in reality Java is initialising and starting Java language server. After a long time the debug env drop down appears. Analysis: Building the debug env drop down seems to activate all debug extensions. Solution: We should try to build the debug env drop down list only from declarative information found in the No debugger extensions should be activated for this. /cc
I acknowledge the bug, however due to how the code is structured on my side this would require a refactoring in the method which I am not so keen on doing because we have better fine grained events as a workaround. Thus pushing this to the backlog
Fixed in latest via
My mistake, acutally this is not fixed via that commit
How's going on for this bug? One more customer reported that they still see Java language server running on the bottom when developing a python file. It is strange. Thank you.
I have cleaned up the activation events and this is now fixed via However since this change is a bit delicate I would prefer to have the whole milestone to self host on it in insiders before we release it in stable. Due to that I will merge the PR in 4 days, so it is included in the next week insider, however it will be only in the october stable release (in a month).
Using our process explorer, I still see the java debugger extension being activated in this case. There is also a slight delay when clicking on the gear
After looking deeper into this, it is fine since the java debugger is activating onDebugInitialConfigurations since it is providing the initial configurations dynamically. Thus we have to activate it since we do not know which debugger the user will chose. Closing as designed. To verify: debug a node program, and verify that the java extension does not get activated

Discussion:
} public resolveConfigurationByProviders(folderUri: uri | undefined, type: string | undefined, debugConfiguration: IConfig): TPromise<IConfig> { <del> return this.extensionService.activateByEvent(`onDebugResolve:${type}`).then(() => { </del> <ins> return this.activateDebuggers(`onDebugResolve:${type}`).then(() => { </ins> // pipe the config through the promises sequentially. append at the end the '*' types const providers = this.providers.filter(p => p.type === type && p.resolveDebugConfiguration) .concat(this.providers.filter(p => p.type === '*' && p.resolveDebugConfiguration));

} public provideDebugConfigurations(folderUri: uri | undefined, type: string): TPromise<any[]> { <del> return TPromise.join(this.providers.filter(p => p.type === type && p.provideDebugConfigurations).map(p => p.provideDebugConfigurations(folderUri))) .then(results => results.reduce((first, second) => first.concat(second), [])); </del> <ins> return this.activateDebuggers('onDebugInitialConfigurations') .then(() => TPromise.join(this.providers.filter(p => p.type === type && p.provideDebugConfigurations).map(p => p.provideDebugConfigurations(folderUri))) .then(results => results.reduce((first, second) => first.concat(second), []))); </ins> } public provideDebugAdapter(session: IDebugSession, folderUri: uri | undefined, config: IConfig): TPromise<IAdapterDescriptor | undefined> {

} public guessDebugger(type?: string): TPromise<Debugger> { <del> return this.activateDebuggers().then(() => { </del> <ins> if (type) { const adapter = this.getDebugger(type); return TPromise.as(adapter); } </ins> <del> if (type) { const adapter = this.getDebugger(type); return TPromise.as(adapter); </del> <ins> const activeTextEditorWidget = this.editorService.activeTextEditorWidget; let candidates: TPromise<Debugger[]>; if (isCodeEditor(activeTextEditorWidget)) { const model = activeTextEditorWidget.getModel(); const language = model ? model.getLanguageIdentifier().language : undefined; const adapters = this.debuggers.filter(a => a.languages && a.languages.indexOf(language) >= 0); if (adapters.length === 1) { return TPromise.as(adapters[0]); </ins> } <del> const activeTextEditorWidget = this.editorService.activeTextEditorWidget; let candidates: Debugger[]; if (isCodeEditor(activeTextEditorWidget)) { const model = activeTextEditorWidget.getModel(); const language = model ? model.getLanguageIdentifier().language : undefined; const adapters = this.debuggers.filter(a => a.languages && a.languages.indexOf(language) >= 0); if (adapters.length === 1) { return TPromise.as(adapters[0]); } if (adapters.length > 1) { candidates = adapters; } </del> <ins> if (adapters.length > 1) { candidates = TPromise.as(adapters); </ins> } <ins> } </ins> <del> if (!candidates) { candidates = this.debuggers.filter(a => a.hasInitialConfiguration() || a.hasConfigurationProvider); } </del> <ins> if (!candidates) { candidates = this.activateDebuggers('onDebugInitialConfigurations').then(() => this.debuggers.filter(a => a.hasInitialConfiguration() || a.hasConfigurationProvider)); } </ins> <del> candidates = candidates.sort((first, second) => first.label.localeCompare(second.label)); const picks = candidates.map(c => ({ label: c.label, debugger: c })); </del> <ins> return candidates.then(debuggers => { debuggers.sort((first, second) => first.label.localeCompare(second.label)); const picks = debuggers.map(c => ({ label: c.label, debugger: c })); </ins> return this.quickInputService.pick<(typeof picks)[0]>([...picks, { type: 'separator' }, { label: 'More...', debugger: undefined }], { placeHolder: nls.localize('selectDebug', "Select Environment") }) .then(picked => { if (picked && picked.debugger) {

}); } <del> public activateDebuggers(): TPromise<void> { return this.extensionService.activateByEvent('onDebugInitialConfigurations').then(() => this.extensionService.activateByEvent('onDebug')); </del> <ins> private activateDebuggers(activationEvent: string): TPromise<void> { return this.extensionService.activateByEvent(activationEvent).then(() => this.extensionService.activateByEvent('onDebug')); </ins> } private store(): void {

return this.fileService.resolveContent(resource).then(content => content.value, err => { // launch.json not found: create one by collecting launch configs from debugConfigProviders <del> return this.configurationManager.activateDebuggers().then(() => { return this.configurationManager.guessDebugger(type).then(adapter => { if (adapter) { return this.configurationManager.provideDebugConfigurations(this.workspace.uri, adapter.type).then(initialConfigs => { return adapter.getInitialConfigurationContent(initialConfigs); }); } else { return undefined; } }).then(content => { </del> <ins> return this.configurationManager.guessDebugger(type).then(adapter => { if (adapter) { return this.configurationManager.provideDebugConfigurations(this.workspace.uri, adapter.type).then(initialConfigs => { return adapter.getInitialConfigurationContent(initialConfigs); }); } else { return undefined; } }).then(content => { </ins> <del> if (!content) { return undefined; } </del> <ins> if (!content) { return undefined; } </ins> <del> created = true; // pin only if config file is created #8727 return this.fileService.updateContent(resource, content).then(() => { // convert string into IContent; see #32135 return content; }); </del> <ins> created = true; // pin only if config file is created #8727 return this.fileService.updateContent(resource, content).then(() => { // convert string into IContent; see #32135 return content; </ins> }); }); }).then(content => {