cannot connect with xDebug Follow
I have spent last 3 hours trying to get debugger working.
phpStorm #PS107.120, running on windows7 x64
phpinfo():
xdebug
xdebug support | enabled |
---|---|
Version | 2.1.1 |
XDEBUG NOT LOADED AS ZEND EXTENSION |
---|
Supported protocols | Revision |
---|---|
DBGp - Common DeBuGger Protocol | $Revision: 1.145 $ |
Directive | Local Value | Master Value |
---|---|---|
xdebug.auto_trace | Off | Off |
xdebug.collect_assignments | Off | Off |
xdebug.collect_includes | On | On |
xdebug.collect_params | 0 | 0 |
xdebug.collect_return | Off | Off |
xdebug.collect_vars | Off | Off |
xdebug.default_enable | On | On |
xdebug.dump_globals | On | On |
xdebug.dump_once | On | On |
xdebug.dump_undefined | Off | Off |
xdebug.extended_info | On | On |
xdebug.file_link_format | no value | no value |
xdebug.idekey | RayZ | RayZ |
xdebug.manual_url | http://www.php.net | http://www.php.net |
xdebug.max_nesting_level | 100 | 100 |
xdebug.overload_var_dump | On | On |
xdebug.profiler_aggregate | Off | Off |
xdebug.profiler_append | Off | Off |
xdebug.profiler_enable | Off | Off |
xdebug.profiler_enable_trigger | Off | Off |
xdebug.profiler_output_dir | \ | \ |
xdebug.profiler_output_name | cachegrind.out.%p | cachegrind.out.%p |
xdebug.remote_autostart | Off | Off |
xdebug.remote_connect_back | Off | Off |
xdebug.remote_cookie_expire_time | 3600 | 3600 |
xdebug.remote_enable | On | On |
xdebug.remote_handler | dbgp | dbgp |
xdebug.remote_host | localhost | localhost |
xdebug.remote_log | no value | no value |
xdebug.remote_mode | req | req |
xdebug.remote_port | 9000 | 9000 |
xdebug.scream | Off | Off |
xdebug.show_exception_trace | Off | Off |
xdebug.show_local_vars | Off | Off |
xdebug.show_mem_delta | Off | Off |
xdebug.trace_format | 0 | 0 |
xdebug.trace_options | 0 | 0 |
xdebug.trace_output_dir | \ | \ |
xdebug.trace_output_name | trace.%c | trace.%c |
xdebug.var_display_max_children | 128 | 128 |
xdebug.var_display_max_data | 512 | 512 |
xdebug.var_display_max_depth | 3 | 3 |
Running with "Denwer". It seems like xdebug configured properly.
So, i guessed, something is wrong in my phpstorm configuration.
PHP Settings: attached php.png
PHP -> Debug Settings: attached php-debug.png
PHP -> Debug Proxy Settings: php-debug-proxy.png
Them i create debug profile - attached project-debug-profile.png
I assumed that you have configured everything correctly, but debugging still doesn't works for me
Pressing "xdebug this page" bookmarklet in Firefox makes blinking "Waiting for incoming connection with ide key ..." message for a couple times (attached file phpstorm-debug.png).
And it still does nothing,
Please, help!
Thank you in advance!
Attachment(s):
phpstorm-debug.png
project-debug-profile.png
php-debug-proxy.png
php-debug.png
php.png
Please sign in to leave a comment.
Hi Andrew,
How did you setup your ADAMARK server in "Settings | PHP | Server" -- taken from project-debug-profile.php ? There may be an issue with mappings ... or incorrect host/port values. Also please double check that IDE Key used in bookmarklet matches the one you are using in PhpStorm.
So far it all seems to be OK (at least I have not spotted anything big on screenshots provided so far). I recommend:
0) Ensure that you have properly setup deployment server at Settings | Deployment (to match URL to local file structure) -- not 100% sure if that is required, but worth checking
1) Delete the server entry ADAMARK completely from Settings | PHP | Server
2) Enable "Break at the first line (for external connections)" option at Settings | PHP | Debug
3) "Activate "Run | Start listen PHP Debug Connections" (that red phone icon on toolbar should turn green)
4) Start debugging session (via bookmarklet, or browser extension, or manually) in browser.
5) If all fine so far PhpStorm should bring popup window asking for a mapping ...
If there are mapping issues (as Denwer, if I remember correctly, using Z:\ path but physically files may be located like C:\denwer\www) you can check the paths from phpinfo() output & thing like echo realpath(__FILE__);
Also please ensure that PhpStorm can accept incoming connections on the Xdebug port (check your firewall/antivirus). Make sure that PhpStorm is the one who listen on that port (screenshot shows that it listens, but please check if still nothing).
I had no issues setting it up and making it work under Apache on Win XP & IIS 7 on Win 7 x32 & x64 (+ KIS 2011).
PHP -> Server settings screenshot is attached. There is no any mappings. Host taken from $_SERVER['SERVER_NAME'], and port from $_SERVER['SERVER_PORT']. Bookmarklet IDE Key is RayZ as seen on phpinfo page.
0) Deployment settings is ok, i guess. Anyway i attached deployment settings screenshots. (deployment-mappings.png, deplyment-connection.png)
1-4) Ok 5) No dialogs appeared as suggested.
Anyway, server running on localhost. I have MS Security Essintials and Windows 7 firewall.
Everythink seems ok.
Attachment(s):
deplyment-connection.png
deployment-mappings.png
php-server.png
maybe it helps, but when i clicking bookmarklet "xdebug" This page, phpstom's debug area message "Waiting for incoming connection with ide keya RayZ" blinking once. It's reacts to "click" event
Hi Andrew,
In general it all seems to be OK -- cannot see anything wrong here (at least from config point of view)...
Few more attempts:
1) Enable "xdebug.remote_autostart = 1" and "xdebug.remote_connect_back = 1" so Xdebug will attempt to establish debug session on every page request (you will have about 1 sec delay before the script actually starts executing (while xdebug tries to establish the connection) but this will simplify things a bit for now).
2.1) Enable logging (one or both of the bellow):
* on Xdebug side via xdebug.remote_log
* on PhpStorm side as described here
2.2) Attach those logs here (or have a look yourself and see if you spot something unusual)
Can't say for sure -- maybe PhpStorm is receiving debug connection but finds no file to debug ... (wrong paths (symlinks?) maybe --- need to see the logs)
As I understand you have read the debug manuals already: http://confluence.jetbrains.net/display/WI/Documentation
If not -- have a look and see if you do anything differently compared to the process described in manuals.
Sure. A lot of times.
Xdebug installation guide - done well. Installed properly. Xdebug working well as we can see on phpinfo page;
BTW, easy Xdebug doesn't works properly with FF4 for me (extension can't save ide key settings from it's dialog). This extension makes this settings from about:config page, so i found another extension later - Xdebug-assistant. This one works properly i guess.
It still makes no sense for my problem.
current PHP.ini xdebug settings
Eclipse PDT accepting debug session with the same settings.
phpStorm log tail:
I see you are using *nix paths on Windows machine (not just a directory separator, but the whole path)... did not know that it will work (unless Denver etc can handle this somehow)
Anyway -- it looks like you have not entered the correct data to enable PhpStorm logging. Based on the log content provided you have entered like this:
while it should be like this (notice the # sign)
The log entries should look like this (much more detailed):
Please also provide xdebug's own log as well (content of file fromxdebug.remote_log) -- I'm interested in first request sent by xdebug -- it should show which file it tries to debug.
Andrew,




Judging by logs xdebug set up correctly and phpstorm accepts debug connections from xdebug. As you are using 'Denwer' the problem should be in mappings.
Here is an example of debug configuration for Denwer:
Remote debug run configuration:
Server configuration:
Also notice that if you are using bookmarklets you can override ide_key value setted in php.ini. The default ide_key value in bookmarklets generator is PHPSTORM:
'Remote debug' run configuration checks the value of ide_key setting, so if the value is wrong your connection will be ignored.
We suggests avoid using of 'Remote Debug' run configuration and use 'Listen debug connections' button instead.
Just enable listening mode:
See details in: http://confluence.jetbrains.net/display/WI/Zero-Configuration+debugging+with+PhpStorm+2.0
Thank you for feedback!
Andrew,
Do you still have the issue?
Try xdebug helper.
It works okay with one tiny exception - it's not installing on ff >= 3.0. But you can fix it's xpi and it works fine.
Hello dmitry,
Thanks for sharing!
Also you can try Xdebug bookmarklets - http://www.jetbrains.com/phpstorm/marklets/.
Have same issue. And also spent about 3 hours for solution finding :)
As I understand that idkey must be in the quotes. At least it was the reason of problem.
Try
xdebug.idekey = "yourKey"