Pārlūkot izejas kodu

运行区分开发和生成

lcl 1 gadu atpakaļ
vecāks
revīzija
c333d48b49
1 mainītis faili ar 21 papildinājumiem un 1 dzēšanām
  1. 21 1
      .vscode/launch.json

+ 21 - 1
.vscode/launch.json

@@ -4,7 +4,7 @@
     // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
     "version": "0.2.0",
     "configurations": [{
-            "name": ".NET Core Launch (web)",
+            "name": ".NET Core Launch (Development)",
             "type": "coreclr",
             "request": "launch",
             "preLaunchTask": "build",
@@ -23,6 +23,26 @@
                 "/Views": "${workspaceFolder}/Views"
             }
         },
+        {
+            "name": ".NET Core Launch (Production)",
+            "type": "coreclr",
+            "request": "launch",
+            "preLaunchTask": "build",
+            "program": "${workspaceFolder}/bin/Debug/netcoreapp3.0/MySystem.dll",
+            "args": [],
+            "cwd": "${workspaceFolder}",
+            "stopAtEntry": false,
+            "serverReadyAction": {
+                "action": "openExternally",
+                "pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
+            },
+            "env": {
+                "ASPNETCORE_ENVIRONMENT": "Production"
+            },
+            "sourceFileMap": {
+                "/Views": "${workspaceFolder}/Views"
+            }
+        },
         {
             "name": ".NET Core Attach",
             "type": "coreclr",