View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001958 | Xdebug | Step Debugging | public | 2021-03-20 19:24 | 2021-03-20 21:14 |
Reporter | marbul | Assigned To | derick | ||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Summary | 0001958: XDEBUG_SESSION does not work in CLI | ||||
Description | Have set debug.mode=debug. xdebug.start_with_request=default (did not change that, just saying) Documentation says that with this config the step debugging will start if "trigger" exists. So I add a trigger XDEBUG_SESSION=1 and xdebug does not start a debugging session: docker exec -it -e XDEBUG_SESSION=1 <container_id> bin/console cache:clear Additional information: - xdebug version: 3.0.0 - works with HTTP requests containing a trigger (XDEBUG_SESSION=1) - works when xdebug.start_with_request=yes - does not work with xdebug.start_with_request=trigger - does not work when XDEBUG_SESSION=1 - log file (/tmp/xdebug.log) is not created (PHP FPM runs as root user, child processes run as www-data user, /tmp is owned by root. I created /tmp/xdebug.log and chown'ed www-data but still no logs) - used PHP Storm build in client but also dbgpClient to verify and the same issues occures as described above I'm still trying to find out what's going on so will update this issue if I find the problem source before someone answers. | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.4.10-7.4.19 | ||||
|
How can i edit issue? I can't see any button like Edit or something. |
|
Just add updates in comments. I don't think Mantis allows you to edit issues. And to ask for more info: what does the output of xdebug_info() ; tell you if you debug a script with that in it? |
|
As I can't see any edit button the I would like to correct this line: `- does not work when XDEBUG_SESSION=1` I meant: does not work when XDEBUG_SESSION=1 is set not via -e option to `docker exec` but in docker-compose file under `environment` key. I don't think is makes any difference but just want to mention this as I've tried even this for certainty. |
|
xdebug_info() output from script code 123 (3,516 bytes)
Version => 3.0.0 Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support Feature => Enabled/Disabled Development Aids => ✘ disabled Coverage => ✘ disabled GC Stats => ✘ disabled Profiler => ✘ disabled Step Debugger => ✔ enabled Tracing => ✘ disabled Diagnostic Log No messages PHP Build Configuration Version => 7.4.13 Debug Build => no Thread Safety => disabled Settings Configuration File (php.ini) Path => /usr/local/etc/php Loaded Configuration File => /usr/local/etc/php/php.ini Scan this dir for additional .ini files => /usr/local/etc/php/conf.d Additional .ini files parsed => /usr/local/etc/php/conf.d/99-xdebug.ini, /usr/local/etc/php/conf.d/docker-php-ext-amqp.ini, /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini, /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini, /usr/local/etc/php/conf.d/docker-php-ext-intl.ini, /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini, /usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini, /usr/local/etc/php/conf.d/docker-php-ext-redis.ini, /usr/local/etc/php/conf.d/docker-php-ext-soap.ini, /usr/local/etc/php/conf.d/docker-php-ext-sockets.ini, /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini, /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini, /usr/local/etc/php/conf.d/docker-php-ext-zip.ini Directive => Local Value => Master Value xdebug.mode => debug => debug xdebug.start_with_request => default => default xdebug.start_upon_error => default => default xdebug.output_dir => /tmp => /tmp xdebug.trigger_value => no value => no value xdebug.file_link_format => no value => no value xdebug.filename_format => no value => no value xdebug.log => /tmp/xdebug.log => no value xdebug.log_level => 7 => 7 xdebug.var_display_max_children => 128 => 128 xdebug.var_display_max_data => 512 => 512 xdebug.var_display_max_depth => 3 => 3 xdebug.max_nesting_level => 256 => 256 xdebug.cli_color => 0 => 0 xdebug.force_display_errors => Off => Off xdebug.force_error_reporting => 0 => 0 xdebug.halt_level => 0 => 0 xdebug.max_stack_frames => -1 => -1 xdebug.show_error_trace => Off => Off xdebug.show_exception_trace => Off => Off xdebug.show_local_vars => Off => Off 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.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p xdebug.profiler_append => Off => Off xdebug.cloud_id => no value => no value xdebug.client_host => 172.18.0.1 => localhost xdebug.client_port => 9003 => 9003 xdebug.discover_client_host => Off => Off xdebug.client_discovery_header => no value => no value xdebug.idekey => no value => no value xdebug.connect_timeout_ms => 200 => 200 xdebug.scream => Off => Off xdebug.gc_stats_output_name => gcstats.%p => gcstats.%p xdebug.trace_output_name => trace.%c => trace.%c xdebug.trace_format => 0 => 0 xdebug.trace_options => 0 => 0 xdebug.collect_assignments => Off => Off xdebug.collect_return => Off => Off |
|
next info: I tried the same with some reproducer app from some project I contributed to and it works. Xdebug 3.0.3 and PHP 8.0.2. xdebug_info() in attachment (mode set via XDEBUG_MODE env var). 1234 (3,101 bytes)
Version => 3.0.3 Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support Enabled Features<br/>(through 'XDEBUG_MODE' env variable) Feature => Enabled/Disabled Development Aids => ✘ disabled Coverage => ✘ disabled GC Stats => ✘ disabled Profiler => ✘ disabled Step Debugger => ✔ enabled Tracing => ✘ disabled Diagnostic Log No messages PHP Build Configuration Version => 8.0.2 Debug Build => no Thread Safety => disabled Settings Configuration File (php.ini) Path => /usr/local/etc/php Loaded Configuration File => (none) Scan this dir for additional .ini files => /usr/local/etc/php/conf.d Additional .ini files parsed => /usr/local/etc/php/conf.d/99-custom.ini, /usr/local/etc/php/conf.d/docker-php-ext-amqp.ini, /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini, /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini Directive => Local Value => Master Value xdebug.mode => develop => develop xdebug.start_with_request => default => default xdebug.start_upon_error => default => default xdebug.output_dir => /tmp => /tmp xdebug.trigger_value => no value => no value xdebug.file_link_format => no value => no value xdebug.filename_format => no value => no value xdebug.log => /tmp/xdebug.log => no value xdebug.log_level => 7 => 7 xdebug.var_display_max_children => 128 => 128 xdebug.var_display_max_data => 512 => 512 xdebug.var_display_max_depth => 3 => 3 xdebug.max_nesting_level => 256 => 256 xdebug.cli_color => 0 => 0 xdebug.force_display_errors => Off => Off xdebug.force_error_reporting => 0 => 0 xdebug.halt_level => 0 => 0 xdebug.max_stack_frames => -1 => -1 xdebug.show_error_trace => Off => Off xdebug.show_exception_trace => Off => Off xdebug.show_local_vars => Off => Off 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.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p xdebug.profiler_append => Off => Off xdebug.cloud_id => no value => no value xdebug.client_host => 172.17.0.1 => localhost xdebug.client_port => 9003 => 9003 xdebug.discover_client_host => Off => Off xdebug.client_discovery_header => no value => no value xdebug.idekey => no value => no value xdebug.connect_timeout_ms => 200 => 200 xdebug.scream => Off => Off xdebug.gc_stats_output_name => gcstats.%p => gcstats.%p xdebug.trace_output_name => trace.%c => trace.%c xdebug.trace_format => 0 => 0 xdebug.trace_options => 0 => 0 xdebug.collect_assignments => Off => Off xdebug.collect_return => Off => Off |
|
I found this in change log: https://bugs.xdebug.org/view.php?id=1921 I will try to upgrade xdebug version in my image to 3.0.3 and see it it helps. |
|
It worked. Issue can be closed. Thank you. |
|
Cheers, will do. Glad it works in Xdebug 3.0.3! |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-03-20 19:24 | marbul | New Issue | |
2021-03-20 19:27 | marbul | Note Added: 0005805 | |
2021-03-20 19:32 | derick | Note Added: 0005806 | |
2021-03-20 19:32 | marbul | Note Added: 0005807 | |
2021-03-20 19:37 | marbul | Note Added: 0005808 | |
2021-03-20 19:37 | marbul | File Added: 123 | |
2021-03-20 19:56 | marbul | Note Added: 0005809 | |
2021-03-20 19:56 | marbul | File Added: 1234 | |
2021-03-20 20:02 | marbul | Note Added: 0005810 | |
2021-03-20 20:34 | marbul | Note Added: 0005811 | |
2021-03-20 21:14 | derick | Assigned To | => derick |
2021-03-20 21:14 | derick | Status | new => resolved |
2021-03-20 21:14 | derick | Resolution | open => no change required |
2021-03-20 21:14 | derick | Note Added: 0005812 |