WS 6.0 'remote' debugger with local files does not stop at breakpoints

Hi

I am working in a local project with javascript embedded in html files.

Viewing the project in Chrome resulted in errors because Chrome does not allow js to serve local files. As a solution I configured WS to use its internal webserver (new in 6.0: http://blog.jetbrains.com/webstorm/2013/03/built-in-server-in-webstorm-6/) and to configur the debugger as remote - accessing the project from 'http://localhost:63342/project'.

This works fine for the Chrome/js problem, but now WS does not stop at the breakpoint I set :-(
How can this be solved ?

7 comments

Hi there,

Have you updated mappings in your Remote JavaScript Run/Debug configuration to reflect new URL? Double check it for any spelling errors (e.g. extra or missing character etc). Maybe even re-create this Run/Debug configuration from scratch (1 min job).

If everything is correct -- restart both IDE and browser (sometimes (very rarely though) one of them freaking out and they do not want to work together anymore -- in those few cases restarting them helped me).

0

I restarted both WS 6 and Chrome. Still the same problem.

Please review my settings:

shot_1.png
shot_2.png
shot_3.png

0

Well .. the JavaScript Remote debug config seems to be OK for me.


Will this simple project also NOT work for you (see attachment abcd.7z on this post) ?

Is your project is some sort of demo/tutorial one? Can you attach it here (whole project, including .idea subfolder)? At very least I can try running it here..

Other than that -- no real ideas (I'm not JavaScript guy -- using it rarely (rather simple jQuery code from time to time)).

0

Ok, I have it solved ! Spend a lot of time on this...

The problem was very simple: in defining the 'remote' debugging, its most important to add the html page as well ! So in my case: 'http://localhost:63342/project' should be 'http://63342/project/index.html'.
Thats all.

So my screenshots before are wrong. Plus there is no need to define any mapping in Settings->Deployment. Below a screenshot with the only needed and correct setting.

This is different from the tutorial at http://blog.jetbrains.com/webstorm/2013/03/built-in-server-in-webstorm-6/ !
However, it is more or less mentioned in the docs: http://www.jetbrains.com/webstorm/webhelp/debugging-javascript.html
But as that does not mention the build-in webserver, I did not pay enough attention to it earlier. I just went for the video tutorial.

shot_4.png

0

Glad you have solved it.

The problem was very simple: in defining the 'remote' debugging, its most important to add the html page as well ! So in my case: 'http://localhost:63342/project' should be 'http://63342/project/index.html'.
Thats all.

TBH I would expect IDE to pickup index.html file automatically without manually specifying it in URL -- just as described in that tutorial.

The only difference I see between your original settings and tutorial is the lack of trailing slash in URL http://localhost:63342/project/  -- possibly that is the reason.


Any way -- case clossed, lesson learned.

0

I did a quick check: with or without the trailing forward slash does not matter. The problem is only solved by explicitely including the html file.

0

Works for me. But possibly because I do have newer build (PhpStorm 6.0.2 build 129.487 here)

screen01.png

If you wish -- give it another try when WebStorm 6.0.2 will be released.

0

Please sign in to leave a comment.