We are no longer accepting contributions to Documentation. Please see our post on meta.
Debugging Angular2 typescript application using Visual Studio Code 2.0.0-rc.6
2.0.0-rc.0
2.0.0-rc.1
2.0.0-rc.2
2.0.0-rc.3
2.0.0-rc.4
2.0.0-rc.5
2.0.0-rc.6
2.0.0-rc.7
2.0.0
2.0.1
2.0.2
2.1.0
2.2.0
2.3.0
4.0.0
4.1.0
4.2.0
4.3.0
4.3.1
4.3.2
4.3.3
This draft deletes the entire topic.
Examples
-
- Turn on Debug from menu - view > debug
- it return some error during start debug, show pop out notification and open launch.json from this popup notification
It is just because of launch.json not set for your workspace. copy and paste below code in to launch.json //new launch.json
your old launch.json
{ "version": "0.2.0", "configurations": [ { "name": "Launch Extension", "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", "args": [ "--extensionDevelopmentPath=${workspaceRoot}" ], "stopOnEntry": false, "sourceMaps": true, "outDir": "${workspaceRoot}/out", "preLaunchTask": "npm" } ] }
Now update your launch.json as below
new launch.json
**// remember please mention your main.js path into it**{ "version": "0.2.0", "configurations": [ { "name": "Launch", "type": "node", "request": "launch", "program": "${workspaceRoot}/app/main.js", // put your main.js path "stopOnEntry": false, "args": [], "cwd": "${workspaceRoot}", "preLaunchTask": null, "runtimeExecutable": null, "runtimeArgs": [ "--nolazy" ], "env": { "NODE_ENV": "development" }, "console": "internalConsole", "sourceMaps": false, "outDir": null }, { "name": "Attach", "type": "node", "request": "attach", "port": 5858, "address": "localhost", "restart": false, "sourceMaps": false, "outDir": null, "localRoot": "${workspaceRoot}", "remoteRoot": null }, { "name": "Attach to Process", "type": "node", "request": "attach", "processId": "${command.PickProcess}", "port": 5858, "sourceMaps": false, "outDir": null } ] }
- Now it debug is working, show notification popup for step by step debugging
Please consider making a request to improve this example.
Still have a question about Debugging Angular2 typescript application using Visual Studio Code?
Ask Question
Sign up or log in
Save edit as a guest
Join Stack Overflow
Using Google
Using Facebook
Using Email and Password
We recognize you from another Stack Exchange Network site!
Join and Save Draft