浏览代码

add automatic start for debug

David Catuhe 8 年之前
父节点
当前提交
044c7a1e25
共有 2 个文件被更改,包括 28 次插入4 次删除
  1. 10 1
      .vscode/launch.json
  2. 18 3
      .vscode/tasks.json

+ 10 - 1
.vscode/launch.json

@@ -8,6 +8,7 @@
             "url": "http://localhost:1338/sandbox/index-local.html",
             "webRoot": "${workspaceRoot}/",
             "sourceMaps": true,
+            "preLaunchTask": "run",
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug",
             "runtimeArgs": [
                 "--enable-unsafe-es3-apis" 
@@ -19,7 +20,8 @@
             "request": "launch",
             "url": "http://localhost:1338/Playground/index-local.html",
             "webRoot": "${workspaceRoot}/",
-            "sourceMaps": true,
+            "sourceMaps": true,            
+            "preLaunchTask": "run",
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug",
             "runtimeArgs": [
                 "--enable-unsafe-es3-apis" 
@@ -32,6 +34,7 @@
             "url": "http://localhost:1338/Playground/index-local.html",
             "webRoot": "${workspaceRoot}/",
             "sourceMaps": true,
+            "preLaunchTask": "run",
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug",
             "runtimeArgs": [
                 "--disable-es3-apis" 
@@ -44,6 +47,7 @@
             "url": "http://localhost:1338/materialsLibrary/index.html",
             "webRoot": "${workspaceRoot}/",
             "sourceMaps": true,
+            "preLaunchTask": "run",
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug",
             "runtimeArgs": [
                 "--enable-unsafe-es3-apis" 
@@ -56,6 +60,7 @@
             "url": "http://localhost:1338/postProcessLibrary/index.html",
             "webRoot": "${workspaceRoot}/",
             "sourceMaps": true,
+            "preLaunchTask": "run",
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug",
             "runtimeArgs": [
                 "--enable-unsafe-es3-apis" 
@@ -68,6 +73,7 @@
             "url": "http://localhost:1338/proceduralTexturesLibrary/index.html",
             "webRoot": "${workspaceRoot}/",
             "sourceMaps": true,
+            "preLaunchTask": "run",
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug",
             "runtimeArgs": [
                 "--enable-unsafe-es3-apis" 
@@ -80,6 +86,7 @@
             "url": "http://localhost:1338/inspector/index.html",
             "webRoot": "${workspaceRoot}/",
             "sourceMaps": true,
+            "preLaunchTask": "run",
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug",
             "runtimeArgs": [
                 "--enable-unsafe-es3-apis" 
@@ -92,6 +99,7 @@
             "url": "http://localhost:1338/localDev/index.html",
             "webRoot": "${workspaceRoot}/",
             "sourceMaps": true,
+            "preLaunchTask": "run",
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug",
             "runtimeArgs": [
                 "--enable-unsafe-es3-apis" 
@@ -104,6 +112,7 @@
             "url": "http://localhost:1338/tests/validation/index.html",
             "webRoot": "${workspaceRoot}/",
             "sourceMaps": true,
+            "preLaunchTask": "run",
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug",
             "runtimeArgs": [
                 "--enable-unsafe-es3-apis" 

+ 18 - 3
.vscode/tasks.json

@@ -14,9 +14,24 @@
             "taskName": "run",
             // Hijack Test Command for easy shortcut
             "isTestCommand": true,
-            "problemMatcher": [
-                "$tsc"
-            ]
+            "isBackground": true,
+            "problemMatcher": {
+                "owner": "typescript",
+                "fileLocation": "relative",
+                "pattern": {
+                    "regexp": "^([^\\s].*)\\((\\d+|\\,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(TS\\d+)\\s*:\\s*(.*)$",
+                    "file": 1,
+                    "location": 2,
+                    "severity": 3,
+                    "code": 4,
+                    "message": 5
+                },
+                "watching": {
+                    "activeOnStart": true,
+                    "beginsPattern": "Starting \\'watch\\'",
+                    "endsPattern": "Finished \\'run\\'"
+                }
+            }
         },
         { 
             "taskName": "typescript-all",