Breakpoints ignored - PhpStorm 10

  • System : OSX 10.11.3
  • IDE : PhpStorm 10.0.3,
  • Php : 7.0.4 (cli)
  • xDebug :  2.4.0RC4

I use PhpStorm just fine on another Mac running php 5.4 with Xdebug 2.2 I think. Breakpoint and all using debug by HTTP Request confs.

But on my main Mac, no dice.

Tried php 5.6, same failure. Tried PhpStorm early access, same results.

So let's see what we have here.

 

 

using new Project with a single index.php as follow:

<?php
$a = 5;
$b = 4;
$c = $a + $b;
echo $c;



with Phpstorm set as :

http://imgur.com/a/AJkju 

logs, setting pannels and all you can ask above.


... help

6 comments

Hi there,

Is CLI debugging works OK (Run/Debug configuration of "PHP Script" type)?

Right now you are using "PHP HTTP Request" type of Run/Debug Configuration.

  • What web server serves it?
  • What URL is used?
  • How do you run PHP in that server (php-fpm ?)?
0

I don't know much about CLI stuff to be honest.

But indeed Run always worked fine while debug breakpoint failed. In terms of console return it's always as intended. Only the breakpoint part fail. That's for my usual debug config using HTTP Request mode.

With the test script on PHP Script mode though, the Run works fine as, no error thrown and the right value returned on console, but the Debug throw a warning "Xdebug connexion not established" with a link "validate installation". Upon clicking it, I have the next message "Debug extension updated, try again.to use new values.." in a infinite loop...

 

no idea log created.

I again make you some screen shots. Don't miss the previous ones too. :)

http://imgur.com/a/l9tFq 

 

 

 

For the last part of your questions :

I use localhost, my apache web server, pretty typical default local dev install.

You can see it on the first post's screen shots. URL for server is just localhost port:80 and for http requests mode simply http://test.dev as shown in the screenshots.

 

The only thing I wonder is why there's a 7.0.3 in the xdebug log you can see in my first post screenshots, when I use php 7.0.4. I know it's maybe not talking about php, but that number is close enough to worry me a bit.

I used to have php7.0.3 installed before I updated. Wasn't working with it either though. So this may be a sign of a bad uninstall or something, I wonder.

 

0

Well .. I see "7.0.1_dev" even though I'm suing 7.0.4 in CLI mode .. so it must be something else.

Try "xdebug.remote_host = 127.0.0.1" -- the "localhost" may be resolved to IPv6 which xdebug does not support (AFAIK).

The CLI debug should work though .. so I'm wondering as well could could be wrong.

P.S. What do you see when you execute this command in terminal (I'm interesting in 9000 port):

sudo lsof -nP -iTCP -sTCP:LISTEN
0

command result :

http://imgur.com/oJWP2ec 

IP localhost didn't change anything. Same results as before.

 

For the remote session unfortunately it's almost 23h here and I work all day on week. So I can be ready around this hour minus 2/3 hours every week day. If you have another window next days.

We'll keep this topic by email then to see if we can setup something.

 

And here is my updated (ip localhost) phpinfo section with xdebug stuff (just in case it matters)

xdebug.auto_trace Off Off
xdebug.cli_color 0 0
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.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 no value no value
xdebug.dump.POST no value no value
xdebug.dump.REQUEST no value no value
xdebug.dump.SERVER no value no value
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.force_display_errors Off Off
xdebug.force_error_reporting 0 0
xdebug.halt_level 0 0
xdebug.idekey no value no value
xdebug.max_nesting_level 256 256
xdebug.max_stack_frames -1 -1
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_enable_trigger_value no value no value
xdebug.profiler_output_dir /var/tmp/ /var/tmp/
xdebug.profiler_output_name xdebug-profile-cachegrind.out-%H-%R xdebug-profile-cachegrind.out-%H-%R
xdebug.remote_addr_header no value no value
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 127.0.0.1 127.0.0.1
xdebug.remote_log /Users/creeall/Sites/xdebug_log/xdebug.log /Users/creeall/Sites/xdebug_log/xdebug.log
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.scream Off Off
xdebug.show_error_trace Off Off
xdebug.show_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_enable_trigger Off Off
xdebug.trace_enable_trigger_value no value no value
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir /var/tmp/ /var/tmp/
xdebug.trace_output_name trace.%c trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 2048 2048
xdebug.var_display_max_depth 128 128
0

Please change xdebug.remote_port to be 9001 (or any another (but still above 1024) instead of default 9000). Same in xdebug section in PhpStorm preferences.

 

Remember my original questions?

>How do you run PHP in that server (php-fpm ?)?

You have php-fpm running on TCP 9000

Based on your xdebug log you had a response -- it was php-fpm who was responding to xdebug -- PhpStorm was not listening on that port as it's already occupied (IDE can detect such scenario on Windows (at least) but not on Mac (Mac specific issue) -- too bad I cannot find corresponding ticket right now, but it is exist for sure).

1

Damn you nailed it Andriy !

changing the port did the trick right away.

Do you know why ?

 

 

For the question I have no idea what fpm is about. I saw that around, but never had the need to learn about it.

I don't run CGI scripts and prolly never will. Don't use virtual hosts, etc.

Long story short I have no idea what you're asking me :) What's the other choices beside fpm ?

 

 

All I can say is I have a feeling fpm came here after I installed php7, never saw this on my mac before.

So maybe homebrew set it up automatically with php7. I remember at the end of "brew install php70", homebrew tells you some manual stuff you need to do to make fpm run at startup. I may have played with that... just out of curiosity.

0

Please sign in to leave a comment.