From e4928314acd2f48e222b0f6ecace754d7854798f Mon Sep 17 00:00:00 2001 From: Vincent Fugnitto Date: Mon, 4 Nov 2019 11:07:22 -0500 Subject: [PATCH] Automatically create 'launch.json' Automatically creates the `launch.json` file when executing the command `start debugging` whenever a `launch.json` does not exist under `.theia` or `.vscode`. Once created, users are prompted to select the type of debug configuration they desire. Signed-off-by: Vincent Fugnitto --- .../src/browser/debug-frontend-application-contribution.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/debug/src/browser/debug-frontend-application-contribution.ts b/packages/debug/src/browser/debug-frontend-application-contribution.ts index b84e8f9180163..e4c18c9f15df8 100644 --- a/packages/debug/src/browser/debug-frontend-application-contribution.ts +++ b/packages/debug/src/browser/debug-frontend-application-contribution.ts @@ -947,6 +947,11 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi async start(noDebug?: boolean): Promise { let { current } = this.configurations; + // If not current configurations are present, create the `launch.json` and prompt users to select the config. + if (!current) { + await this.configurations.addConfiguration(); + return; + } if (current) { if (noDebug !== undefined) { current = {