Setting up a JetBrains IDE for breakpoints?

Hello,

Can anyone share the details on getting a JetBrains based IDE setup for break points?

I have read this discussion:discussion which indicates it its possible but it does not explain how to actually do it. I’ve got the Chrome plugin and can set break points in Chrome, but I would like to be able to do it in my IDE. I think the secrete sauce is in the launch configs but I’m not sure…

thx.

I have had some success with this.

First, setup a Javascript Debug config and configure it like so: Imgur: The magic of the Internet

Also map dist/index.html to http://localhost:4200/index.html

Then, run ember serve, make sure the jetbrains chrome extension is installed, and then you can run your debug config. When you run it, it will open it url in chrome, and you can set breakpoints in your Jetbrains IDE.

I have had mixed success with this, it works, but the sourcemapping seems to be wonky.

Please let me know if you find an improvement in the configuration.

Thanks! This is closest I have gotten so far! The biggest problem I see is breakpoints not lining up… For example ember.debug.js appears to as my index.html file. I guess more mappings could fix this.

Oh, Intellij has a nice feature that helps setup the mappings…

If you have a breakpoint set in Chrome or Intellij and it can’t find the file it needs a new editor is opened. At the top of the file is are a couple of buttons and an address. The address is the URL that needs to be mapped to a file… You can find the file in the launch config and paste in that address. The next time you launch the debug config the file is found automatically!