XDEbug trace and profiling
Hello!
I found a tutorial.
http://devzone.zend.com/1120/introducing-xdebug/
This tutorial describes how to xdebug for profiling and trace can use.
I have 2 questions.
What is the structure of the trace file and the profiling file defined for PhpStorm ?
How can you import these files into PhpStorm easiest ?
For example:
PhpStorm->Tools->Analyze Stacktrace-> ( I miss the same as in, PhpStorm->Tools-> Analyze Xdebug profiler snapshot)
Sincerely yours
Stephan
Please sign in to leave a comment.
Hi there,
There is no special structure just for PhpStorm -- the file gets created by xdebug and PhpSorm just reads it as is. You can customize what info you want to put there by configuring your xdebug -- check xdebug manual: http://xdebug.org/docs/all_settings#trace_enable_trigger
Tools | Analyze Xdebug Profiler Snapshot...
More:
Sorry, I do not understand what you are trying to say here ..
Sorry.
I meant to import a trace file in PhpStorm.
Is there a convenient way?
Sincerely yours
Stephan
From what I see PhpStorm only supports profiler data and not actual function trace files, which is a different thing (but who knows, maybe I'm wrong here, since I do not use this actual thing).
You can generate trace file in simple HTML format by xdebug itself and see the data in your default browser: http://xdebug.org/docs/all_settings#trace_format
A simple idea !
// Notiz:
ob_start();
var_dump(xdebug_get_function_stack());
$content = ob_get_contents();
file_put_contents('c:/xampp/htdocs/tmp/log.html', $content);
ob_end_clean();
Your sincerly
Stephan
I find a way to parse the xdebug trace file, https://github.com/splitbrain/xdebug-trace-tree
It's also worth to check out the xDebug Chromium Trace Converter https://github.com/ilnytskyi/xdebug-to-chromium-trace-converter