开发者

xDebug : Output traces in php script?

I have tried to use xDebug on my local Ubuntu environment to speed up development and it's a great asset.

Howeve开发者_运维问答r, I would like to see the output of the Trace function directly in the browser, at the end of the script.


The xdebug_start_trace / xdebug_stop_trace functions only write to a file. These are what you are talking about right? But you could then read that file at the very end of your script so it would display.

xdebug_start_trace('/path/to/log');
blah blah
xdebug_stop_trace();
readfile('/path/to/log');

If you need to step through your code regularly though, I would suggest using an external program (http://xdebug.org/docs/remote). Using one of those with xdebug will let you step through your code, set breakpoints, etc...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜