Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: --<!-- Use Help Report Issue to prefill these. --- VSCode Version: 1.44.0 OS Version: Win 10 1909, .720 Steps to Reproduce: a multi root workspace panel -Add configuration (workspace)... Expected to see a dropdown list showing supported debug configurations (just like in single root mode). Actual behavior is that only the .code-workspace file gets focus. <!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes
Aha, for the the Add configuration (workspace) you would like the debug configuration providers to be called. This is a fair feature request, however not on the immedaite plan thus assigning to backlog. We would be open to a pr that adds this. If you are intersted let me know and I can provide a code pointer
Sure I'd like to make the change. And it would be great if you can give me some code pointers.
Here's a code pointer Thanks
After looking at the code, I found that the suggestions wouldn't pop up if the "configurations" field doesn't exist in single root mode as well. So I'm planning to add some code to insert launch configure lines when they don't exist. Since I didn't find anywhere in this code base inserting some texts at a certain position into a file, do you have an example (I think settings is already doing something like this)?
If you have an instance of an you could for example.

Discussion:
import { RunOnceScheduler } from 'vs/base/common/async'; import * as env from 'vs/base/common/platform'; import { visit } from 'vs/base/common/json'; <ins> import { setProperty } from 'vs/base/common/jsonEdit'; </ins> import { Constants } from 'vs/base/common/uint'; import { KeyCode } from 'vs/base/common/keyCodes'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';

import { ITextModel } from 'vs/editor/common/model'; import { getHover } from 'vs/editor/contrib/hover/getHover'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; <ins> import { EditOperation } from 'vs/editor/common/core/editOperation'; import { basename } from 'vs/base/common/path'; </ins> const HOVER_DELAY = 300; const LAUNCH_JSON_REGEX = /.vscode/launch.json$/;

"debug/addLaunchConfiguration" : {} */ this.telemetryService.publicLog('debug/addLaunchConfiguration'); <del> let configurationsArrayPosition: Position | undefined; </del> const model = this.editor.getModel(); if (!model) { return; } <del> let depthInArray = 0; </del> <ins> let configurationsArrayPosition: Position | undefined; </ins> let lastProperty: string; <del> visit(model.getValue(), { onObjectProperty: (property, offset, length) => { lastProperty = property; }, onArrayBegin: (offset: number, length: number) => { if (lastProperty === 'configurations' && depthInArray === 0) { configurationsArrayPosition = model.getPositionAt(offset + 1); </del> <ins> const getConfigurationPosition = () => { let depthInArray = 0; visit(model.getValue(), { onObjectProperty: (property: string) => { lastProperty = property; }, onArrayBegin: (offset: number) => { if (lastProperty === 'configurations' && depthInArray === 0) { configurationsArrayPosition = model.getPositionAt(offset + 1); } depthInArray++; }, onArrayEnd: () => { depthInArray--; </ins> } <del> depthInArray++; }, onArrayEnd: () => { depthInArray--; } }); </del> <ins> }); }; getConfigurationPosition(); </ins> <del> this.editor.focus(); </del> <ins> if (!configurationsArrayPosition) { // "configurations" array doesn't exist. Add it here. const { tabSize, insertSpaces } = model.getOptions(); const eol = model.getEOL(); const edit = (basename(model.uri.fsPath) === 'launch.json') ? setProperty(model.getValue(), ['configurations'], [], { tabSize, insertSpaces, eol })[0] : setProperty(model.getValue(), ['launch'], { 'configurations': [] }, { tabSize, insertSpaces, eol })[0]; const startPosition = model.getPositionAt(edit.offset); const lineNumber = startPosition.lineNumber; const range = new Range(lineNumber, startPosition.column, lineNumber, model.getLineMaxColumn(lineNumber)); model.pushEditOperations(null, [EditOperation.replace(range, edit.content)], () => null); // Go through the file again since we've edited it getConfigurationPosition(); } </ins> if (!configurationsArrayPosition) { return; } <ins> this.editor.focus(); </ins> const insertLine = (position: Position): Promise<any> => { // Check if there are more characters on a line after a "configurations": [, if yes enter a newline if (model.getLineLastNonWhitespaceColumn(position.lineNumber) > position.column) {