Can't get remote xdebug to work w/ PHPStorm 7

I've been trying for 2 days now and I can't get xdebug to work on a remote server. I'm using PHPStorm 7 on Mac Os 10.9. Got it to work locally if I just used my XAMPP setup, but not remotely. I have an Amazon AWS server set up and have verified that xdebug is installed along with php 5.5 and apache. I have the following in my php.ini file relating to xdebug:

[xdebug]
zend_extension = /usr/lib64/php/5.5/modules/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.idekey="PHPStorm"
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.remote_log="/tmp/xdebug.log"

Here's the xdebug related output from phpinfo():

Directive => Local Value => Master Value
xdebug.auto_trace => Off => Off
xdebug.cli_color => 0 => 0
xdebug.collect_assignments => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 4 => 4
xdebug.collect_return => On => On
xdebug.collect_vars => Off => Off
xdebug.coverage_enable => On => On
xdebug.default_enable => On => On
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => * => *
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => REMOTE_ADDR,REQUEST_METHOD => REMOTE_ADDR,REQUEST_METHOD
xdebug.dump.SESSION => no value => no value
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 => PHPStorm => PHPStorm
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 => On => On
xdebug.profiler_enable_trigger => Off => Off
xdebug.profiler_output_dir => /tmp => /tmp
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_autostart => On => On
xdebug.remote_connect_back => On => On
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 => /tmp/xdebug.log => /tmp/xdebug.log
xdebug.remote_mode => req => req
xdebug.remote_port => 9000 => 9000
xdebug.scream => Off => Off
xdebug.show_exception_trace => On => On
xdebug.show_local_vars => On => On
xdebug.show_mem_delta => Off => Off
xdebug.trace_enable_trigger => Off => Off
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.trace_output_dir => /tmp => /tmp
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

I have port 9000 forwarded on my router to my machine. I've verified this by using a port checker.

In PHP->Servers I have my server and my paths mapped and have been able to verify the remote environment. It comes back showing that it loaded the proper php.ini file and that it loaded XDebug 2.2.3. Oddly enough, the 3rd thing it says on that dialog is "Remote host: localhost"....not sure if that's an issue and/or how to even change this. Anywhoo, I hit the "start listen..." button, set a breakpoint, and attempt to debug. The debug configuration I'm using has the server set to my AWS server (the same one I verified had xdebug running) and my IDE session key matches that of php.ini: it's PHPStorm. But when I try and debug, it just sits there forever saying "Waiting for incoming connection with ide key 'PHPStorm'".

Looking at the xdebug logging info, I show that I have indeed successfully connected: it shows my IP and the port and says "Connected to client. :-)". I'm not sure what else to try at this point. Anyone have any suggestions? Thanks.

Edit: I have my firewall disabled on my mac. Also, I have "can accept external connections" checked and my xdebug port in the preferences is 9000. "Break at first line" is also set.

1 comment
Comment actions Permalink

OK I got it. And it's simple. I didn't realize that you couldn't hit the "debug" button in PHPStorm. I fixed it by going to my server address/the page to test, and upon load php storm popped up letting me debug the page. Hooray!

0

Please sign in to leave a comment.