2 Replies Last post: Mar 1, 2012 1:06 PM by philip westwell  
philip westwell Newbie 5 posts since
Feb 28, 2012
Currently Being Moderated

Feb 29, 2012 5:28 PM

Do I always need to set the remote URLs for Javascript files when debugging locally in Webstorm?

I've been using Webstorm for a month now, and I'm beginning to question whether I'm configuring debug correctly each time when debugging against localhost.

 

My code seems fairly standard in using a single html file and a collection of javascript files organised in various directories.

 

When starting to debug, I've already given Webstorm both the URL and the filesystem location of the html file I want to use as the starting point of the debug session. I've also told Webstorm about the url and file location of the web root when setting up the project. But when I go, I immediately get messages about remote URLs not being specified so breakpoints won't be hit. Obviously I can set these up, but all I do each time is append the URL of the web root to the .js file path within the Webstorm project, and Webstorm already has all this information!

 

It strikes me that Webstorm should easily be able to work out these "remote URLs" based on the information it has. Is there a reason why it can't do this, or have I missed something in the debug setup?  

 

Thanks

 

Phil

Nikolay Chashnikov Novice 93 posts since
Mar 27, 2009

If your html files are static i.e. they aren't provided by a web server you can use a local JavaScript debug configuration. In that case files will be opened in a browser directly from the disk so there will be no need to specify any mappings at all.

If your html files are generated by a web server you indeed need to specify mappings between local folders and URLs in two places: the project configuration and the JavaScript run configuration. We already have an issue about that (http://youtrack.jetbrains.com/issue/WI-4761).

More Like This

  • Retrieving data ...