From 101758914cc369bf3f15366a2d558b21e448554e Mon Sep 17 00:00:00 2001 From: Gregg Miskelly Date: Mon, 2 May 2016 17:08:43 -0700 Subject: [PATCH] Add 'ASPNETCORE_ENVIRONMENT' to default ASP.NET launch options This checkin adds 'env' to the launch.json schema, and it adds a "ASPNETCORE_ENVIRONMENT=Development" environment variable by default. This completes the fix for https://github.com/OmniSharp/omnisharp-vscode/issues/172 --- package.json | 9 +++++++++ src/assets.ts | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e46ab38525..8e47d85fef 100644 --- a/package.json +++ b/package.json @@ -258,6 +258,12 @@ } } }, + "env": { + "type": "object", + "additionalProperties": { "type": "string" }, + "description": "Environment variables passed to the program.", + "default": { } + }, "sourceFileMap": { "type": "object", "description": "Optional source file mappings passed to the debug engine. Example: '{ \"C:\\foo\":\"/home/user/foo\" }'", @@ -349,6 +355,9 @@ "linux": { "command": "xdg-open" } + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" } }, { diff --git a/src/assets.ts b/src/assets.ts index b921a533ce..ca8085ebdd 100644 --- a/src/assets.ts +++ b/src/assets.ts @@ -24,7 +24,8 @@ interface ConsoleLaunchConfiguration extends DebugConfiguration { program: string, args: string[], cwd: string, - stopAtEntry: boolean + stopAtEntry: boolean, + env?: any } interface CommandLine { @@ -164,6 +165,9 @@ function createWebLaunchConfiguration(targetFramework: string, executableName: s linux: { command: 'xdg-open' } + }, + env: { + ASPNETCORE_ENVIRONMENT: "Development" } } }