- Activate sourceMaps if running with TypeScript
- Make sure Chrome/Chromium runs with debugging on Port 9222
=> Close Chrome and restart with the flag
--remote-debugging-port=9222
- If in
attach
-mode, anurl
, or better:urlFilter
is required:"urlFilter": "http://localhost:4200/*"
- Set the
webRoot
to yoursrc
folder:"webRoot": "${workspaceFolder}/src"
- To fix the source map matching, add
sourceMapPathOverrides
:"sourceMapPathOverrides": { "webpack:///src/*": "${webRoot}/*" }
- If not working immediately, use the
"trace": "verbose"
-option, reconnect the debugging and scroll up the console to the path matching, it will give debug logs on which parts are matched where to following the current override-rules.
Last active
May 19, 2018 20:57
-
-
Save wtho/8a8924481763dc671c67b8868e54b695 to your computer and use it in GitHub Desktop.
Configure launch.json in vscode for Webpack + TypeScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "attach", | |
"name": "Attach to chrome", | |
"port": 9222, | |
"urlFilter": "http://localhost:8080/*", | |
"address": "localhost", | |
"timeout": 1000, | |
"webRoot": "${workspaceFolder}/src", | |
"sourceMaps": true, | |
"sourceMapPathOverrides": { | |
"webpack:///./src/*": "${webRoot}/*", | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment