Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Getting Google Chrome via WebStorm to run the examples


Biggerplay
 Share

Recommended Posts

I've downloaded the 30 day trial of WebStorm, but when I run the the index.html of the examples with it's open in browser option (google chrome) it displays the index page correctly, but then when I click on say the first example load an image, it gives me the error "Unable to load basics/01 - load an image.js, this same example runs fine when I navigate to the local MAMP directory myself in the finder and click on the index.html file and so on. I noticed the port numbers are different to when I go to the index page via MAMP and the port number that is shown when webstorm opens a browser to the local directory.

 

How can I setup Webstorm so that when it opens Google Chrome, Chrome is set to the correct MAMP local directory URL/Port?

Link to comment
Share on other sites

Webstorm has a build in Webserver (so you don't have to use xampp wamp or anything else).

 

The Webstorm Webserver has the port "63342" (by default at least).

 

Is that the port that is used?

 

 

If I edit my Debug-Run-Configuration and change the port (as seen in the screenshot) and then choose this run configuration to run, in my case I can influence if my xampp installation is used (by putting it's port in the url) or if the webstorm webserver is used (by putting the 63342 port in the url).

 

It seems weird, that your webstorm ignores the given port in the url. Are you sure, you have saved the changes to the run configuration, and that you are starting exactly the configuration you edited?

 

Afterthought:

If I use the build-in webserver everything runs fine. Are the assets you are trying to load located within the directory of your project? (if they are not the webstorm webserer won't be able to load them.)  - If you fix this, you can just use the internal webserver and you don't have to start your wamp anymore to develope.

Link to comment
Share on other sites

Webstorm has a build in Webserver (so you don't have to use xampp wamp or anything else).

 

The Webstorm Webserver has the port "63342" (by default at least).

 

Is that the port that is used?

 

That's the port being used, but the examples are not working, at least not working at that port number, but they work fine at the MAMP 8888 port number, which is why I was trying to get that into webStorm, but I didn't know it had it's own web server, even though the examples don't seem to be working through it.

Link to comment
Share on other sites

Here's a bunch of screen shots which hopefully will shed some light on what I'm doing wrong.

 

Screen Shot 1

 

That shows how I changed the defaults. I also tried the way you suggested by setting up a new one but that didn't work anyway.

 

Screen Shot 2

 

That shows the basic project with the examples index.html opened.

 

Screen Shot 3

 

That shows the error when trying the first example with the WebStorm web server port.

 

Screen Shot 4

 

Finally, this shows the first example working running in the MAMP directory.

 

Let me know if there's any other additional info you need.

Link to comment
Share on other sites

The only other thing I can think of, is that something went wrong when creating the webstorm project.

 

Maybe try again to make a new probject with these steps:

 

 

1) "File" - "New Project from existing Files"

 

2) Choose "Webserver is installed locally (Option 1)

 

3) Choose the phaser directory (in your case that seems to be "/Applications/MAMP/htdocs/Git") - when you have navigated to that directory and it's in focus click the "WS" Button (and enable the "Project Root" Toggle-Button) above the tree, then choose "Next"

 

4) In the next step specify "http://localhost:8888 as your local server (your mamp needs to be running at that point)

 

5) Give the project a name ("phaser" for example)

 

6) Project should be opened now, open the index.html in examples and press Alt + Shift + F9 (or choose Menu: "Run" - "Debug...") (this will create the debug configuration on the fly, it may ask you which file you meant, if you have multiple open - just choose the index.html then.)

 

I hope that works.. otherwise I think you should try the webstorm support (or their forums).

(Since I think it's not a phaser problem, that your webstorm seems to want to use the internal-webserver instead of you wamp. But it might all be resolved, when you follow the steps above. Let's hope for the best :) )

 

Good luck :)

Link to comment
Share on other sites

I had the same problem.

You do not need to use MAMP or another server, WEBSTORM have an internal server.

First of all remove the other server and restart your computer

Launch WEBSTORM and look in the general preferences, the address is 63342

post-4833-0-12851700-1390156505.png

 

If you try several times with another server, you have probably changed the local configuration of the launch menu for the debug.

 

Push the pop-up menu (top right of the main window) and choose Edit Confgurations

post-4833-0-44667300-1390156505.png

 

if the URL is not the good one (saying with 63342) delete with the minus button (-) all the configurations you can have.

post-4833-0-07280300-1390156506_thumb.pn

 

close the menu (with OK), when you try to launch the debug program, WEBSTORM will automatically recreate a new configuration with the good address.

 

Have a nice day

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...