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" } } }