Simple example how to make VS Code auto-launch and present errors to you with zero extra effort. Just launch at will.
Email me at sebastian@stateful.com or join Discord to talk to us about VS Code tricks.
Simple example how to make VS Code auto-launch and present errors to you with zero extra effort. Just launch at will.
Email me at sebastian@stateful.com or join Discord to talk to us about VS Code tricks.
// A launch configuration that compiles the extension and then opens it inside a new window | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Run Extension", | |
"type": "extensionHost", | |
"request": "launch", | |
"runtimeExecutable": "${execPath}", | |
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "--disable-extensions"], | |
"outFiles": ["${workspaceFolder}/dist/**/*.js"], | |
"preLaunchTask": "npm: watch" | |
} | |
] | |
} |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"type": "npm", | |
"script": "watch", | |
"label": "npm: watch", | |
"isBackground": true, | |
"group": "build", | |
"problemMatcher": [ | |
{ | |
"pattern": [ | |
{ | |
"regexp": "ERROR in (.+)\\((\\d*,\\d*)\\)\\n(.+)$", | |
"file": 1, | |
"location": 2, | |
"message": 3 | |
} | |
], | |
"background": { | |
"activeOnStart": true, | |
"beginsPattern": "^asset .+ related asset$", | |
"endsPattern": "^webpack .+ in \\d+ ms$" | |
} | |
} | |
] | |
} | |
] | |
} |