Wrong URL in web browser after Run -> Debug on drupal 7 module
I'm using the PhpStorm 7.1 release and drupal 7.24. I created a module. But there is a problem using xdebug.
phpinfo tells:
| Version | 2.2.3 |
| IDE Key | XDEBUG_ECLIPSE |
First I set a breakpoint at the first hook on the return line.
If I press 'Run -> Debug' a blank browser window is opened with the wrong URL:
"http://localhost:63342/drupal7/sites/all/modules/custom/trails/trails.module"
The port wrong, localhost is wrong. MAMP runs on port 80. If I delete '63342' I get the message:
Not Found
The requested URL /drupal71/sites/all/modules/custom/trails/trails.module was not found on this server.
The Run window message is:
/Volumes/Intel/Applications/MAMP/bin/php/php5.5.9/bin/php /Applications/MAMP/htdocs/drupal71/sites/all/modules/custom/input/input.module
Process finished with exit code 0
Do you have an idea what the problem is?
Regards,
bolshii
Please sign in to leave a comment.
The local drupal installation is mapped on 127.0.0.1 drupal.local on '/etc/hosts' and the 'vhost.conf'. If I debug the URL startet with localhost:port/drupal_folder/sites ...
Where do I have to configure it?
Hi there,
There is NOTHING wrong with URL.
You have not configured proper URL of your website .. so IDE uses default one, which is served by built-in simple webserver (hence the "localhost:63342/PROJECT_NAME" kind of URL).
To configure URL that will be used you have to create and properly configure deployment entry at "Preferences | Deployment" and mark it as Default for this project.
You are trying to execute this script in CLI mode instead of using browser.
You need to create Run/Debug Configuration of correct type via "Run | Edit Configurations..." (or via drop-down box on main toolbar -- next to Run/Debug buttons).
The above message means that you have used "PHP Script" type of configurations (for executing current script in CLI mode). You should use different type.
Few links:
It work's!
thanks a lot :-)