Skip to content

Commit 09c5dd0

Browse files
Merge pull request #274 from gregg-miskelly/EnvLaunchOption
[Dev] Add 'ASPNETCORE_ENVIRONMENT' to default ASP.NET launch options
2 parents 2699034 + 1017589 commit 09c5dd0

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,12 @@
261261
}
262262
}
263263
},
264+
"env": {
265+
"type": "object",
266+
"additionalProperties": { "type": "string" },
267+
"description": "Environment variables passed to the program.",
268+
"default": { }
269+
},
264270
"sourceFileMap": {
265271
"type": "object",
266272
"description": "Optional source file mappings passed to the debug engine. Example: '{ \"C:\\foo\":\"/home/user/foo\" }'",
@@ -352,6 +358,9 @@
352358
"linux": {
353359
"command": "xdg-open"
354360
}
361+
},
362+
"env": {
363+
"ASPNETCORE_ENVIRONMENT": "Development"
355364
}
356365
},
357366
{

src/assets.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ interface ConsoleLaunchConfiguration extends DebugConfiguration {
2424
program: string,
2525
args: string[],
2626
cwd: string,
27-
stopAtEntry: boolean
27+
stopAtEntry: boolean,
28+
env?: any
2829
}
2930

3031
interface CommandLine {
@@ -164,6 +165,9 @@ function createWebLaunchConfiguration(targetFramework: string, executableName: s
164165
linux: {
165166
command: 'xdg-open'
166167
}
168+
},
169+
env: {
170+
ASPNETCORE_ENVIRONMENT: "Development"
167171
}
168172
}
169173
}

0 commit comments

Comments
 (0)