Skip to content
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

Not able to debug with VSCode (I think is something related with how angular-cli uses webpack) #2491

Closed
jorgeas80 opened this issue Oct 3, 2016 · 3 comments

Comments

@jorgeas80
Copy link

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Ubuntu 16.04

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.16
node: 6.7.0
os: linux x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

  • ng new myapp
  • open the project in vscode
  • generate a new launch.json file to enable debug. Like this one. Just use port 4200 instead of 3000
  • ng serve
  • Put breakpoints in the code. They don't work. The chrome instance launchs properly but it doesn't stop in breakpoints.

Tried changing webRoot propery to "${workspaceRoot}/src". and "${workspaceRoot}/src/app". Didn't work either.

The log given by the failure.

Normally this include a stack trace and some more information.

No log, it just breakpoints don't work.

Mention any other details that might be useful.

The same configuration for vscode launch for this repo. You put breakpoints and they work.

If I put "debugger;" at some point of my ts file, VSCode stops at the generated js file, not at the original ts one.


Thanks! We'll be in touch soon.

@yuri1969
Copy link

yuri1969 commented Oct 3, 2016

@jorgeas80 Try the package.json examples proposed here #2453.

@jorgeas80
Copy link
Author

Thanks! Finally worked. In a weird way (debugger opens to tabs, and I need to close one of them and then reload the other to make it work). But it works :-). Thanks!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
clydin pushed a commit to clydin/angular-cli that referenced this issue Aug 29, 2023
Migrations are currently published as CommonJS and also not bundled. Schematics, of which migrations are a type, are currently required to be CommonJS modules due to the Schematics Runtime not yet supporting ESM-based schematics.

closes angular#2491
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants