Courtney Miles
Courtney Miles

Reputation: 4014

XDebug - Disable writing traces to file

I have XDebug configured in PHP with the following settings

xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.var_display_max_depth=1000
xdebug.var_display_max_data=100000
xdebug.var_display_max_children=10000
xdebug.auto_trace=On
xdebug.collect_includes=On

After a short period of time, it created 17GB of trace files in /tmp :)

I really don't care to have trace written to file. How can I turn that feature off?

Changing xdebug.auto_trace to off seems to work, I don't think that's the correct way. The docs says that's for allowing for traces when auto_prepend is used, and I'm using auto_prepend in my project so would like traces to begin before those files are prepended.

Upvotes: 2

Views: 1674

Answers (2)

MarcoZen
MarcoZen

Reputation: 1663

xdebug.auto_trace is required for the auto prepend stuff.

Try this( from the docs)

xdebug.default_enable
Type: boolean, Default value: 1

If this setting is 1, then stacktraces will be shown by default on an error event. You can disable showing stacktraces from your code with xdebug_disable(). As this is one of the basic functions of Xdebug, it is advisable to leave this setting set to 1.

Upvotes: 0

Derick
Derick

Reputation: 36774

The xdebug.auto_trace setting is the correct one. You need to set that to "On" (default is "Off") to make traces. If you don't want traces anymore, you need to turn it "Off" again.

The docs only say that it makes it possible to trace function through auto_prepend. Without it, it won't trace functions in auto_prepend files, but functions are traced in the normal part of the script.

Upvotes: 2

Related Questions