View Issue Details

IDProjectCategoryView StatusLast Update
0001984XdebugUncategorizedpublic2021-06-16 18:17
Reporterrulatir Assigned Toderick  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionno change required 
Product Version3.0.0 
Summary0001984: Can step debugging and profiling be separately triggerable?
DescriptionIs it possible (as of Xdebug 3.0 and its simplified configuration) to have a single, never-need-to-edit, never-need-to-restart-php-fpm-container xdebug.ini configuration that will support:

 - `develop` by default
 - step debugging (but not profiling) upon a trigger
 - profiling (but not step debugging) upon a _different_ trigger

?

If so, how?
TagsNo tags attached.
Operating System
PHP Version8.0.0-8.0.4

Activities

exussum

2021-06-14 11:36

reporter   ~0005903

You can enable multiple modes at the same time by comma separating their identifiers as value to

xdebug.mode: xdebug.mode=develop,debug,profile

The triggers for debug are
XDEBUG_SESSION_START
in GET / POST / ENV for debug

and
XDEBUG_TRIGGER
in GET/POST/ENV for profiling

derick

2021-06-16 18:17

administrator   ~0005905

Hi!

This is certainly possible.

Set xdebug.mode=develop,debug,profile

And then you can either use a browser extension as described in the documentation (https://xdebug.org/docs/step_debug#browser-extensions), or specifically trigger
step debugging with a GET/POST/ENV/COOKIE named "XDEBUG_SESSION", or
profiling with a GET/POST/ENV/COOKIE named "XDEBUG_PROFILE"
This is all described in the documentation at https://xdebug.org/docs/all_settings#start_with_request

I am creating a (short) video/animation of this at the moment as well, which will show up at my YouTube channel at https://www.youtube.com/playlist?list=PLg9Kjjye-m1g_eXpdaifUqLqALLqZqKd4

Please do note, that this is a bug tracker, and not a support forum. For support options, including (free) community support, please refer to https://xdebug.org/support

cheers,
Derick

Issue History

Date Modified Username Field Change
2021-06-11 13:03 rulatir New Issue
2021-06-14 11:36 exussum Note Added: 0005903
2021-06-16 18:17 derick Assigned To => derick
2021-06-16 18:17 derick Status new => closed
2021-06-16 18:17 derick Resolution open => no change required
2021-06-16 18:17 derick Note Added: 0005905