-
Notifications
You must be signed in to change notification settings - Fork 12k
Debugging in IDE #159
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
Comments
Something like this? https://www.jetbrains.com/webstorm/help/debugging-typescript.html I haven't used it, but Angular 2 in typescript is a TS project just like any other. You should be able to debug it with normal TS debugging tools. |
I'm developer advocate for PyCharm/WebStorm and do a bunch of Angular. @doczoidberg if you have some specifics, give me a nudge. But I suspect this question might be a little too broad for the angular-cli team. |
I installed the jetbrains chrome extension and the console ouput is send to webstorm. Also chrome says "JetBrains IDE Support" is debugging this browser. But breakpoints in my ts files are not hit. |
@doczoidberg This might be related to the brocolli build step and code transpilation in @pauleveritt does jetbrains debugging tools output instrumented code, and rely on that instrumentation to trigger editor behaviour? |
@doczoidberg can you try debugging the quickstart example? |
@doczoidberg I asked the WebStorm folks for some help, but surprisingly, it just worked with Tour of Heroes. I pointed the Debug run config at http://localhost:3000 and had to configure my Chrome extension's port to match what WebStorm was expecting. After that it worked. If you'd like, I can make a little screencast with an illustration. |
that would be awesome. I think i am doing something wrong. |
No I don't think it's you. I think the the build process and concat, there was some talk about debugging tools and this within the team. We might need to make a few adjustments to the CLI for IDE debugging to work well. |
@filipesilva Here you go: https://www.youtube.com/watch?v=RQSRKi3VZ3I |
thanks. But this does not work with angular cli projects as filipesilva also mentioned |
@pauleveritt this is pretty cool! Thank you for making this video! |
@doczoidberg Ah, sorry, I got mixed up in the issue thread, I thought I was responding to when @filipesilva asked you to try it with Tour of Heroes. Like you, I badly want to switch to angular-cli, but as it's still baking in the oven, if we try now we'll burn our fingers. :) Things like this (debugging the brocolli'd output) and trying to get third-party libs into the bundles are still raw. |
@filipesilva My pleasure, but a bigger thanks to all of you for working on angular-cli. The amount of complexity you're dealing with, and the rate of change by all variables, I can't imagine how you keep it all in your head. |
I'll keep this issue open, the goal is to have good tooling when using the CLI, it's just not there yet. |
There's nothing particularly difficult or impossible about using an IDE to debug. Closing this, but maybe we should add information on some README or wiki about how to configure your favorite IDE to run |
@hansl maybe instead of having the IDE run the |
@zackarychapple +1000 |
Before upgrading to webpack, I could debug my angular 2 app. Now with webpack I can not debug anything using Webstorm or using Chrome Debugger because there are no ts files. How can I debug my angular 2 app with angular-cli in Chrome or Webstorm? |
This issue should be reopened because angular-cli changed to webpack and does not generate the correct source maps in order for debugging to work for typescript. This is definitely something that should be fixed before releasing. |
I have successfully solved problem with debugging with webpack in Intellij/Webstorm based on this solution: http://stackoverflow.com/questions/39348213/how-to-debug-angular-2-app-using-angular-cli-webpack. You have to map your main ui project directory and directory with .ts sources to remote url, exactly the same as in the solution upside. My tsconfig.json: |
see #2750 |
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. |
is it or will it ever be possible to debug angular-cli (typescript) based projects inside the IDE?
The text was updated successfully, but these errors were encountered: