debug: allow serverReadyAction to run a launch config by name

https://github.com/microsoft/vscode/issues/109931
This commit is contained in:
Connor Peet
2020-11-03 09:59:30 -08:00
parent 57340b736b
commit ab9bb823ea
3 changed files with 43 additions and 5 deletions

View File

@@ -16,9 +16,10 @@ const WEB_ROOT = '${workspaceFolder}';
interface ServerReadyAction {
pattern: string;
action?: 'openExternally' | 'debugWithChrome';
action?: 'openExternally' | 'debugWithChrome' | 'startDebugging';
uriFormat?: string;
webRoot?: string;
name?: string;
}
class ServerReadyDetector extends vscode.Disposable {
@@ -155,6 +156,10 @@ class ServerReadyDetector extends vscode.Disposable {
});
break;
case 'startDebugging':
vscode.debug.startDebugging(session.workspaceFolder, args.name || 'unspecified');
break;
default:
// not supported
break;