-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug cli-generated project with Visual Studio Code #1223
Comments
@daverupp - just an aside question- in general, are you able to do angular2 development on Windows? I tried on windows10, but I ran into some npm module that was trying to create symlinks, which was failing on windows. I do not remember which module it was- it could have been part of the quickstart project. |
So far everything is working. Honestly I just started with developing with Angular2. But the "Hero" quickstart works properly. |
@daverupp sorry my bad- I must have been remembering some other node modules which fail on windows because of symlinking. Angular2 quickstart works great on Win10. |
@daverupp - this doesn't work for me. Do you start with "ng serve" and then run the debug-session? |
Can't answer this myself as I don't use the functionality you're trying to use, but will flag it for community help. |
Yes I tried to run with ng serve. The angular app is running in localhost:4200. Then I tried to attach to port 9222 via chrome (I attached this to the chrome launch: --remote-debugging-port=9222) when run visual studio code, in the console is written: "SW registered". So that seems to be promising. But when I go to localhost:4200 and click on a button to hit the breakpoint, still nothing happens... Anyone can help? |
To too am unable to debug angular-cli created application in VC Code. Seemingly no combination of launch.json setting will enable breakpoints being hit. There is alot of chatter in the debug console related to "webpack" when the I added as tcs task to force the creation of the *.js and *.map files to be co-resident with the *.ts files to no avail (this worked on an non-cli app served from iisExpress, not via tsserver). Thanks! |
I can debug from Visual Studio Code after adding a
See also Microsoft/vscode-chrome-debug#226 for a |
@ufleisch Thanks! I've confirmed that I too can debug given the launch.json you've provided. Note I'm using windows and an absolute path was necessary. |
Closing in favor of #2453 since there's more investigation and solutions there. |
If you are windows users try to change in your launch.json sourceMapPathOverrides from default:
and Launch Chrome against localhost, with sourcemaps from VSCode |
Hi All, I am still facing the problem. Below is the launch.json file: {
] Please help me out. |
There's an official VSCode guide in https://github.com/Microsoft/vscode-recipes/tree/master/Angular-CLI as well. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Version:
Windows 10
angular-cli: 1.0.0-beta.8
node: 6.2.2
os: win32 x64
I changed nothing in the code, I am just trying to get it working with Visual Studio Code :-)
Here is my launch.json content:
`
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch index.html with sourcemaps",
"type": "chrome",
"request": "launch",
"file": "${workspaceRoot}/src/index.html",
"sourceMaps": true,
"webRoot": "${workspaceRoot}/dist/"
},
{
"name": "Launch localhost with sourcemaps",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200/index.html",
"sourceMaps": true,
"webRoot": "${workspaceRoot}/dist/"
}
`
The text was updated successfully, but these errors were encountered: