View Issue Details

IDProjectCategoryView StatusLast Update
0002291XdebugTracingpublic2024-11-27 15:57
Reporterkevinfoster Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status resolvedResolutionno change required 
PlatformDell XPS 15 9510OSWindows 10 ProOS Version22H2
Product Version3.3.2 
Summary0002291: function tracing doesn't work on Windows 10 with Nginx 1.9.4 and PHP 8.3.12
Description

When adding xdebug_start_trace() and xdebug_stop_trace() to a function I want to trace, no trace file is generated.

Steps To Reproduce

With the above set up, I add the following to the top of the class that holds the function I want to trace:

ini_set('xdebug.output_dir', 'C:/dev-server/www/opg_code/data/misc');
ini_set('xdebug.trace_output_name', 'covercraft.postback');
ini_set('xdebug.collect_assignments', 1);
ini_set('xdebug.collect_return', 1);
ini_set('xdebug.var_display_max_children', 32);
ini_set('xdebug.var_display_max_data', 1024);
ini_set('xdebug.var_display_max_depth', 6);

I put xdebug_start_trace() at the top pf the function I want to trace and xdebug_stop_trace() before the return statement.

I had the following at the end of my php.ini:

zend_extension = xdebug
xdebug.mode = trace
xdebug.use_compression = false
xdebug.log = C:\dev-server\logs\xdebug.log

Ran the app, no trace file was generated. xdebug log said:

[22876] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_TRACE'
[22876] [Config] INFO: Trigger value for 'XDEBUG_TRACE' not found, so not activating

Added 'XDEBUG_TRACE=1' to query string, ran the app again, and no trace file was generated

Added 'xdebug.start_with_request = yes' to php.ini, ran the app again, no trace file.

Added 'xdebug.output_dir = C:\dev-server\www\opg_code\data\misc' to php.ini, ran app again, now get trace file of the app loading*, but still no trace file for the function I want to trace.

(*the app was built in Zend Framework 2, and has been updated over the last few years to keep up with changes to PHP)

Additional Information

I'm not sure when this stopped working; it's been a while since I needed to debug anything in this app, but function tracing has worked for years with just the 'zend_extension = xdebug' in the php.ini file, the ini_set calls listed above in the class in question, and the calls to xdebug_start_trace() and xdebug_stop_trace() in the particular function I needed to trace. I've spent hours going through the docs on xdebug.org, and I don't know what I'm missing.

Tagsfunction trace, not working
Operating System
PHP Version8.3.10-8.3.19

Activities

derick

2024-10-08 15:18

administrator   ~0007060

If you add a call to xdebug_info() in the function that you are tracing (after xdebug_start_trace()), what does it say?

kevinfoster

2024-10-08 20:04

reporter   ~0007070

Sorry to have wasted your time, Derick; when I got no response from xdebug_info(), I figured out that I had an error in the app setup on my local dev server and all API calls were going to my staging server instead of to my local dev server. And of course, there were no calls to any xdebug functions in the service class on the staging server that contains the function I needed to trace. Once I found and fixed that error, local function tracing works as it always has. I appreciate your taking the time to reply.

derick

2024-11-27 15:57

administrator   ~0007090

Hi Kevin,

thanks for letting me know. These things happen!

cheers,
Derick

Issue History

Date Modified Username Field Change
2024-10-04 18:54 kevinfoster New Issue
2024-10-04 18:54 kevinfoster Tag Attached: function trace
2024-10-04 18:54 kevinfoster Tag Attached: not working
2024-10-08 15:18 derick Assigned To => derick
2024-10-08 15:18 derick Status new => feedback
2024-10-08 15:18 derick Note Added: 0007060
2024-10-08 20:04 kevinfoster Note Added: 0007070
2024-10-08 20:04 kevinfoster Status feedback => assigned
2024-11-27 15:57 derick Status assigned => resolved
2024-11-27 15:57 derick Resolution open => no change required
2024-11-27 15:57 derick Note Added: 0007090