[xdebug-general] Re: Is xDebug available for PHP 7.1.9 ?

From: <castor_troy[@]tut.by>
Date: Thu, 21 Sep 2017 12:28:14 +0300
Hi,
 
I run these commands that you send to me.
 
 
vagrant@vagrant:~/sites$ php --version
PHP 7.1.9-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: Sep  2 2017 06:17:11) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.9-1+ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
 
======================================================================================
 
 
vagrant@vagrant:~/sites$ php -i | grep xdebug
/etc/php/7.1/cli/conf.d/20-xdebug.ini,
xdebug
xdebug support => enabled
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 => XDEBUG_SESSION_START => XDEBUG_SESSION_START
xdebug.max_nesting_level => 256 => 256
xdebug.max_stack_frames => -1 => -1
xdebug.overload_var_dump => 2 => 2
xdebug.profiler_aggregate => Off => Off
xdebug.profiler_append => Off => Off
xdebug.profiler_enable => Off => Off
xdebug.profiler_enable_trigger => Off => Off
xdebug.profiler_enable_trigger_value => no value => no value
xdebug.profiler_output_dir => /tmp => /tmp
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_addr_header => no value => no value
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 => /home/vagrant/sites/xdebug.log => /home/vagrant/sites/xdebug.log
xdebug.remote_mode => req => req
xdebug.remote_port => 9008 => 9008
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 => /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
 
 
 
 
 
 
 
Can you give me some advice?
 
 
 
 
 
 
 
20.09.2017, 16:55, "Spencer Williams" <enderandpeter@yahoo.com>:
On 9/20/2017 1:23 AM, castor_troy@tut.by wrote:
Hello,

1) 

I  have the project which is installed under vagrant machine.
I have Ubuntu 14.04 on this vagrant installation.
My project uses PHP 7.1.9
I have installed xdebug running 

sudo apt-get install php-xdebug

Then I have added such settings into /etc/php/7.1/mods-available/xdebug.ini   ( I am using nginx, that is why my PHP is running using FPM)


zend_extension=xdebug.so

xdebug.remote_enable = 1
xdebug.remote_port = 9008
xdebug.remote_autostart = 1
xdebug.remote_handler = dbgp
xdebug.idekey = XDEBUG_SESSION_START
xdebug.remote_connect_back = On
xdebug.remote_mode = req
xdebug.remote_log = "/home/vagrant/sites/xdebug.log"
xdebug.default_enable=1
xdebug.remote_connect_back=1



2) I am using phpStorm, and I have set xdebug port as: 9008   (like in my xdebug.ini)

http://dl4.joxi.net/drive/2017/09/20/0024/2304/1575168/68/ba849755c8.jpg

3) I have made all neccesary settings in my phpStorm

http://dl3.joxi.net/drive/2017/09/20/0024/2304/1575168/68/c676d73d43.jpg

4) I have added the path to php  (inside vagrant installation )   /usr/bin/php7.1

http://dl4.joxi.net/drive/2017/09/20/0024/2304/1575168/68/b14e60979a.jpg


5)  Then I have put the breakpoint on the first line of my php script 

http://dl4.joxi.net/drive/2017/09/20/0024/2304/1575168/68/4f578c317d.jpg   

6) Then I press 'Debug' button in phpStorm ( look prev screenshot ) 

7) In my Chrome the page has been started to load

http://dl3.joxi.net/drive/2017/09/20/0024/2304/1575168/68/cb8a8f686e.jpg

8) I see that server is waiting, and that is why Chrome does not show anything.
It looks like xdebug is working, BUT phpStorm does not stop on my breakpoint.

This is the problem which I can't solve yet.


9) If I press 'Stop' button in phpStorm and reload the page which I try to debug -- 
It loads quickly without any delays:

http://dl4.joxi.net/drive/2017/09/20/0024/2304/1575168/68/93a4c48bc0.jpg

Pls, help me or give me some advice, how can I fix it?

Thank You.





19.09.2017, 19:52, "Derick Rethans" <derick@xdebug.org>:
On Tue, 19 Sep 2017, castor_troy@tut.by wrote:

 Can You help me?
 I want to know if xDebug is available for PHP 7.1.9 ?
It's certainly available.

 I have tried to use it under vagrant environment.
 I have Ubuntu 14.04.1 and PHP7.1.9 on it.

 Can you help me to Identify if the problem is with my PHP version?
I can't help, as you have not mentioned what you have tried, what
happened, and which errors you received.

In general, just following this, should work:
https://xdebug.org/wizard.php

cheers,
Derick
--
Like Xdebug? Consider a donation: https://xdebug.org/donate.php
Xdebug | https://xdebug.org | xdebug-general@lists.xdebug.org
twitter: @derickr and @xdebug
 
 

Thanks a lot for all the info and the very useful screenshots. Okay, it looks like you have things setup right. I'd like to confirm that when you say php --version, it reports the presence of Xdebug. Also, do a php -i | grep xdebug to make sure it's picking up on the config.

It's great you're using PHPStorm because they have a nice feature for helping you confirm very positively that everything is going to work. Take a look at my guide at https://aninternetpresence.net/dev-guides/amp/xdebug/. Make sure you go to Run -> Web Server Debug Validation and confirm everything is indeed filled out so that it reports that there are no issues. You should see a dialog box verifying all your settings: https://aninternetpresence.net/wp-content/uploads/2017/02/PHPStorm_WebsiteValidate.png

If you are seeing verification of that nature, then I hope we can narrow the issue down to the IDE. Otherwise, something still may not be in order on the server.

 
--

-Spencer

-----------------
"What a lark! What a plunge!"
- Mrs. Dalloway, Virginia Woolf
Received on Thu Sep 21 2017 - 10:35:30 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST