Debugging from Idea to javascript in chrome

I used to be able to debug javascript in Chrome, setting breakpoints in Idea & hitting them using the Chrome webapp.   Now I launch the debugger, but don't stop on the breakpoints.

I tried to configure a custom user profile as described here:  https://www.jetbrains.com/help/webstorm/configuring-javascript-debugger.html but it still doesn't work.   Besides not hitting the breakpoint, I don't have the button in the extension settings to see or change the debugger port.   Idea says it is connecting on a port (62756 this time), but I don't know what port the browser is listening on.

I tried running with the custom user data that Idea generates by default, but it doesn't have the jetbrains plugin installed.   When I did install it, it didn't work & also didn't persist between invocations of the chrome session

What other steps are needed here?   I'm using Ultimate 2018.3 EAP.

Thanks,  Beth

8 comments

WebStorm uses Chrome protocol with --remote-debugging-port option for debugging by default, Chrome extension is no more used; debugger is started on arbitrary port.

Please can you share a sample project we can use to recreate your issue? This is likely a configuration problem (mising/inaccurate sourcemaps, etc)

 

0

+1 for being able to set the debugger port. This is very frustrating.

I have a Chrome shortcut on my desktop, which I now have to edit every time i want to debug JS after Intellij told me which "arbitrary port" it is this time.

You can't be serious, that i can't configure this.

And yes, thanks to my endpoint security software (i guess) on my company computer Chrome crashes when started by IntelliJ. So i have to start it manually.

Or is there something i didn't see?

0

FWIW, I gave up on using idea to debug javascript in the browser & now use the chrome dev tools.   They aren't as nice as the jetbrains tool was when it worked, but I can set breakpoints & see the variable values & so on, so I can manage.   If it ever does get working again, I'll switch back.

 

Beth

0

@Elizabeth Kirby  please can you elaborate on this? What problems using the debugger you have faced? normally the app that can be debugged in Dev tools can also be debugged in IDEA

0

What I used to do was to hit the debug button for the web app, which worked fine.  Then something changed & there was the 'you can't use the chrome you have running, you have to do this, that & the other thing'   I tried setting that up some time ago & never got it so it would work & gave up.   I think I tried setting it up with various different kinds of browsers & it didn't work ... I don't remember all the variations I tried, just that it never worked.

 
Also, it's a hassle, at best, to have to use another instance of chrome that isn't the one I'm logged in to.
 
If you can tell me how to do something like what used to work, e.g. install a plugin & then pick 'go', that would be great.  At this point, I'll try it again if there is a single, simple step that works consistently, but I'm ok enough with the chrome dev tools that it would need to be pretty easy.    From the comment that Lars made, I think that is not (yet) the case.
 
Thanks,  Beth
0

>If you can tell me how to do something like what used to work, e.g. install a plugin & then pick 'go', that would be great

Normally you don't need installing and configuring anything at all - on hitting Debug a new Chrome instance will be launched with the debugger attached. But it won't be the instance you are logged in.

As it's written in docs (https://www.jetbrains.com/help/webstorm/configuring-javascript-debugger.html), there is no way to pass --remote-debugging-port option to Chrome if it's already started. If you like to attach the debugger to a running Chrome instance, using  JetBrains IDE Support Chrome Extension is the only way to go. See https://www.jetbrains.com/help/webstorm/using-jetbrains-chrome-extension.html#install_JB_Chrome_extension

0

I tried using the chrome extension to debug the web app.   It does launch a new tab in the browser window, but it doesn't load any content into the page.  FWIW, I'm running on Mac Mojave, but it didn't work on previous mac OSs either.

Thanks anyway,  Beth

 

0

Please sign in to leave a comment.