提交 40093c6c 编写于 作者: I isidor

debug: when more than 1 adapter is interested in a language let the user choose

fixes #19670
上级 b3ddcbd4
......@@ -397,9 +397,9 @@ export class ConfigurationManager implements debug.IConfigurationManager {
const codeEditor = <ICommonCodeEditor>editor.getControl();
const model = codeEditor ? codeEditor.getModel() : undefined;
const language = model ? model.getLanguageIdentifier().language : undefined;
const adapter = this.adapters.filter(a => a.languages && a.languages.indexOf(language) >= 0).pop();
if (adapter) {
return TPromise.as(adapter);
const adapters = this.adapters.filter(a => a.languages && a.languages.indexOf(language) >= 0);
if (adapters.length === 1) {
return TPromise.as(adapters[0]);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册