setup for xdebug debugging

Hello All!

I'm very sorry, I'm a new here, so, may be I have a silly question, but I spend two days to solve my problem without good result. I hope that you could help me.
I can't start debug my project. I think there something strange with mapping... I use xdebug, which installed in php successfuly - I see in phpinfo that it is ok.
My xdebug settings are:


[xdebug]
xdebug.remote_enable=On
xdebug.remote_autostart=On
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.idekey="PhpStorm1"
xdebug.profiler_enable=0
xdebug.remote_log="z:\xdebug_log.txt"


First I will describe you my project structure:
Local path to the project is : "z:/home/be.ru/www/"
So in browser I type "http://www.be.ru"

what kind of mapping I need to do, for right debugging.

Now, when I press debug button, I have this message:

Validation failed:
Hostname missing from URI "http:///www.be.ru/PhpStorm-465c723a-c00c-4879-ae30-e8955ff42d56.php?port=9000&sessionId=465c723a-c00c-4879-ae30-e8955ff42d56".
What does it mean?



Thank you.
5 comments
Comment actions Permalink

Hello Alexander,

If your project files are right under server web root, you have to provide mapping between your project root ('z:/home/be.ru/www') and project URL (relative to web server URL, i.e. web server url is http://www.be.ru and project URL is just '/').
If your server picks up files from different location (i.e. is accessible via mounted folder), you also need to specify the path where to deploy your files.

[Nervertheless you can create the project right in the mounted folder, we don't support such a setup, since IDE relies on fast access to the project files for performance reasons.]

To specify these mappings you need to open File | Settings | Deployment dialog, select your server, and switch to 'Mappings' tab.

Hostname missing from URI "http:///www.be.ru/PhpStorm-465c723a-c00c-4879-ae30-e8955ff42d56.php?port=9000&sessionId=465c723a-c00c-4879-ae30-e8955ff42d56".

Sorry for unclear error message, we will fix that soon. The problem is that you have 3 slashes in your web server URL: note http:///www.be.ru instead of http://www.be.ru. Please try removing an extra slash and then start debugging.

BTW your Xdebug settings look OK, but still don't turn off 'Validate Xdebug configuration' checkbox at your run configuration dialog, at least for the first time.

Regards,
Kirill

0
Comment actions Permalink

Hello, Kirill!

Thank you very much for your answer! I did what you say and it now starts without errors, but... when I start Debug, it loads page (http://www.be.ru/?XDEBUG_SESSION_START=PhpStorm1) and it is all - no reaction on breakpoints. It looks like It only start page in browser. Interesting, that in debug window in IDE in Variables window this label exist - "Waiting for conection on port 9000 with ide key 'PhpStorm1'".
What does it mean? Why it didn't get connection?

Thank you very much for support and great IDE!

0
Comment actions Permalink

Hello Alexander,

Thank you for your feedback

Do you have 'Validate Xdebug configuration' turn on in run configuration dialog and you get no error dialog when you start debugging?

Please try checking 'Break at the fist line' option to see if it breaks at the first line.

Also please try commenting out the following settings in php.ini, they might interfere with the IDE:

xdebug.remote_autostart=1
xdebug.idekey="PhpStorm1"


If nothing helps, please attach Xdebug log file that should be at "z:\xdebug_log.txt" accodring to your settings.

Thanks,
Kirill

0
Comment actions Permalink

Yes, I have "Validate Xdebug configuration" option selected, and I see, when debug starts, that it validates configuration.
Elso I set 'Break at the first line' option - nothing changed and than comment lines in php.ini - resula is the same.
Nothing changed...
I attached xbebug log file.

May be, problem in my .htaccess file?

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
AddDefaultCharset UTF-8



Attachment(s):
xdebug_log.txt.zip
0
Comment actions Permalink

Hello Alexander,

Thanks for the logs,

I see that Xdebug successflly connects to the PhpStorm, IDE no breakpoints (you probably removed all of them for the last debugging try?) and then immediately disconnects. Since you probably have 'Stop session when the page is processed' option turned off, the session stays active and waits for the next connection from debugger (this is useful if your main page makes additional requests to other pages when loaded).

The reason why it disconnects is unclear to me. If 'Z:/home/be.ru/www/index.php' file is not completely empty (unlikely case ), it may be a problem with Xdebug compatibility with your Web server, PHP installation and OS (there was couple of problems reported at http://bugs.xdebug.org, mostly on Windows). Did you try to debug with some other tool or IDE? Can you try the latest Xdebug version (http://xdebug.org/find-binary.php)?

Regards,
Kirill

0

Please sign in to leave a comment.