XDebug Again! Works on 1 Server, Doesn't on the other

I have several servers in our network. xDebug works well on one partially fails on the other. I am connecting to both from the same IDE on my desktop at 192.168.5.100. I am debugging from Chrome using xDebug helper.

WORKS ON THIS SERVER:
PHP 5.4.25 in Apache on Ubuntu

debug.profiler_aggregate Off Off
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger On On
xdebug.profiler_output_dir /tmp /tmp
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 192.168.5.100 192.168.5.100
xdebug.remote_log no value no value
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.scream Off Off



xDebug FAILS (but profiler WORKS) on this server in IIS 7 on Windows server(PHP 5.3.5)  

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 On On
xdebug.profiler_output_dir c:\inetpub\logs\Xdebug_profiler\ c:\inetpub\logs\Xdebug_profiler\
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 192.168.5.100 192.168.5.100
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
8 comments
Comment actions Permalink

Hi there,

Maybe it's path mappings? If the same project is used to debug on different OS then path mappings would not work as expected.

In any case -- collect logs:

0
Comment actions Permalink

I am "pretty sure" that the mappings are correct. These are 2 different projects.

What I notice is that PHPStorm doesn't even get called, there is no Invalid path messages when I run

0
Comment actions Permalink


What I notice is that PHPStorm doesn't even get called, there is no Invalid path messages when I run

That's what xdebug log (from xdebug side) should confirm -- does xdebug gets initiated or maybe it does not see xdebug cookie at all.

In any case:

  • Activate "phone handle" icon in PhpStorm so that it listens on xdebug port for incomming connections
  • From that server, using telnet, attempt to connect to PhpStorm (using IP and port you have there) -- it's possible that firewall blocks connections somewhere.
0
Comment actions Permalink

BINGO!

Telnet responds with "Could not open connection on port 23..."

Any pointers as to what I need to do? It must be on the server since I can get connections from other servers on my editing machine.

0
Comment actions Permalink

Why are you trying to connect to port 23 when you should be connecting to xdebug one, which is 9000 (accordingly to your settings)?

In any case: xdebug log will help a lot here.

0
Comment actions Permalink

OK. I did another telnet:
o 192.168.5.100 9000

I get no response. Just hangs.

Where should I look for the xdeug log?

0
Comment actions Permalink

Got it. I set up a xdebug log, tried again and I am now getting a connection to PHPStorm.

THANKS for your help.

I am not sure what pleases me more, the PHPStorm editor or your PROMPT and helpful support.

0
Comment actions Permalink
Where should I look for the xdeug log?

I gave you the link in my first comment.

You should edit your php.ini to set the path to the xdebug log, restart web server (recycling app pool may be enough) and attempt to debug.

BTW:
You can trigger debug attempt programmatically from your code: xdebug_break();

I get no response. Just hangs.

If it's unable to connect, it should give you this kind of response (I'm doing local connection):

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Andriy>telnet 127.0.0.1 9000
Connecting To 127.0.0.1...Could not open connection to the host, on port 9000: Connect failed

C:\Users\Andriy>

With successful connection it should be different (for me it was blinking cursor on empty screen)

0

Please sign in to leave a comment.