Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot debug with debugger in concurrent mode #617

Open
vonglasow opened this issue Jul 12, 2016 · 3 comments
Open

Cannot debug with debugger in concurrent mode #617

vonglasow opened this issue Jul 12, 2016 · 3 comments
Assignees
Labels

Comments

@vonglasow
Copy link
Member

vonglasow commented Jul 12, 2016

It works well when I use the inline engine and I can debug my code but If I use the concurrent engine I cannot break on breakpoint.

/v/w/d/tdd ❯❯❯ php -i | grep remote_auto
xdebug.remote_autostart => Off => Off
/v/w/d/tdd ❯❯❯ XDEBUG_CONFIG="idekey=DEBUGMETHAT" ./vendor/bin/atoum -xc "idekey=DEBUGMETHAT" -mcn 1 -d tests/units
> atoum path: /var/www/dev/tdd/vendor/atoum/atoum/./vendor/bin/atoum
> atoum version: dev-master
> PHP path: /usr/bin/php7.0
> PHP version:
=> PHP 7.0.8-4+deb.sury.org~trusty+1 (cli) ( NTS )
=> Copyright (c) 1997-2016 The PHP Group
=> Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
=>     with Zend OPcache v7.0.8-4+deb.sury.org~trusty+1, Copyright (c) 1999-2016, by Zend Technologies
=>     with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
> Workshop\tests\units\Countdown...
Error: XDEBUG_CONFIG variable must not be set or value of xdebug.remote_autostart must be 0 to use xdebug with concurrent engine

And, if I remove the first constant, I have a break on nowhere (no file displayed) and all existants breakpoint doesn't work. The script continue to be executed. I can dig into process with step into and step out command of debugger but no breakpoint react (breakpoint are in tests classes)

./vendor/bin/atoum -xc "idekey=DEBUGMETHAT" -mcn 1 -d tests/units

Here my xdebug configuration

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 => DEBUGMETHAT => DEBUGMETHAT
xdebug.max_nesting_level => 1000 => 1000
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 => On => On
xdebug.profiler_enable_trigger => On => On
xdebug.profiler_enable_trigger_value => no value => no value
xdebug.profiler_output_dir => /tmp/xdebugprofiler/ => /tmp/xdebugprofiler/
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_addr_header => no value => no value
xdebug.remote_autostart => Off => Off
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 => no value => no value
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 => /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 => 10 => 10

I use vdebug (joonty/vdebug.git) and vim to debug

atoum --version => 67104f2d0f0bdea40343428b8ba6f289a0d948ae

@jubianchi jubianchi added the bug label Jul 12, 2016
@mikaelrandy
Copy link
Member

Can you add an output of the current code in this file :

var_dump(getenv('XDEBUG_CONFIG'));

@vonglasow
Copy link
Member Author

@mikaelrandy see follow the complete output

$ ./vendor/bin/atoum -xc "idekey=DEBUGMETHAT" -mcn 1 -d tests/units
> atoum path: /Users/ashgenesis/dev/tmp/workshop-tdd/vendor/atoum/atoum/./vendor/bin/atoum
> atoum version: dev-master
> PHP path: /usr/local/Cellar/php70/7.0.7/bin/php
> PHP version:
=> PHP 7.0.7 (cli) (built: May 27 2016 11:13:44) ( NTS )
=> Copyright (c) 1997-2016 The PHP Group
=> Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
=>     with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
=>     with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
> Workshop\tests\units\Countdown...
[..__________________________________________________________][0/2]/Users/ashgenesis/dev/tmp/workshop-tdd/vendor/atoum/atoum/classes/test/engines/concurrent.php:188:
bool(false)
S.__________________________________________________________][1/2]/Users/ashgenesis/dev/tmp/workshop-tdd/vendor/atoum/atoum/classes/test/engines/concurrent.php:188:
bool(false)
S__________________________________________________________][2/2]
=> Test duration: 0.13 second.
=> Memory usage: 0.00 Mb.
> Workshop\tests\units\Moment...
[....________________________________________________________][0/4]/Users/ashgenesis/dev/tmp/workshop-tdd/vendor/atoum/atoum/classes/test/engines/concurrent.php:188:
bool(false)
S...________________________________________________________][1/4]/Users/ashgenesis/dev/tmp/workshop-tdd/vendor/atoum/atoum/classes/test/engines/concurrent.php:188:
bool(false)
S..________________________________________________________][2/4]/Users/ashgenesis/dev/tmp/workshop-tdd/vendor/atoum/atoum/classes/test/engines/concurrent.php:188:
bool(false)
S.________________________________________________________][3/4]/Users/ashgenesis/dev/tmp/workshop-tdd/vendor/atoum/atoum/classes/test/engines/concurrent.php:188:
bool(false)
S________________________________________________________][4/4]
=> Test duration: 0.05 second.
=> Memory usage: 0.00 Mb.
> Total tests duration: 0.18 second.
> Total tests memory usage: 0.00 Mb.
> Code coverage value: 88.46%
=> Class Workshop\Countdown: 88.89%
==> Workshop\Countdown::computeNumberOfCheckedBox(): 66.67%
==> Workshop\Countdown::draw(): 85.71%
=> Class Workshop\Moment: 87.50%
==> Workshop\Moment::getDatetime(): 0.00%
> Running duration: 0.74 second.
Success (2 tests, 6/6 methods, 0 void method, 0 skipped method, 66 assertions)!
> There is 1 output:
=> In Workshop\tests\units\Moment::testNewInstance():
/Users/ashgenesis/dev/tmp/workshop-tdd/tests/units/src/Moment.php:9:
string(18) "idekey=DEBUGMETHAT"

I have added the var_dump ligne 188 as asked and added also in test class. (cf: output)

As see apparently, the constant is correctly recognized in test class but not in atoum process. (false)

@trasher
Copy link
Contributor

trasher commented Oct 13, 2017

I had similar issue with previous releases; but this seems to be fixed now; I'm able to set breakpoints even with default mode.

@jubianchi jubianchi self-assigned this Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants