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

5 comments
Comment actions Permalink

Hi there,

What is the structure of the trace file and the profiling file defined for PhpStorm ?

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

How can you import these files into PhpStorm easiest ?

Tools | Analyze Xdebug Profiler Snapshot...

More:

For example:
PhpStorm->Tools->Analyze Stacktrace-> ( I miss the same as in,  PhpStorm->Tools-> Analyze Xdebug profiler snapshot)

Sorry, I do not understand what you are trying to say here ..

0
Comment actions Permalink

Sorry.

I meant to import a trace file in PhpStorm.
Is there a convenient way?

Sincerely yours

Stephan

0
Comment actions Permalink

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

0
Comment actions Permalink

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

1
Comment actions Permalink

I find a way to parse the xdebug trace file, https://github.com/splitbrain/xdebug-trace-tree

0

Please sign in to leave a comment.