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

0
6 comments

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

Sorry.

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

Sincerely yours

Stephan

0

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

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

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

0

It's also worth to check out the xDebug Chromium Trace Converter https://github.com/ilnytskyi/xdebug-to-chromium-trace-converter

0

Please sign in to leave a comment.