Hi!
My name is Balázs Wittmann, and I would like to ask about two things makes
me confusing about the working of Xdebug. First of all, I have already
searched for answers, read documentations and FAQs but unfortunately found
nothing.
I am a Drupal developer and I have been using Xdebug for a couple of months
to debug my Drupal projects. I am using Xdebug helper (
https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc)
browser extension too, to make the debug process easier. Of course I set up
my Xdebug configurations with the appropriate settings for the "GET/POST"
and "COOKIE" based debug mode. Until now, I just used the Xdebug helper's
"Debug" option, to set breakpoints in my projects (I using PhpStorm IDE for
code editing by the way). This option always worked fine, so this is not
the subject of my letter. Today, in my xdebug.ini file, I set the profiling
and tracing related Xdebug settings too, because I wanted to try out these
features too. It seemed they work properly, but when I took a closer look I
noticed something confusing, which are described below:
1. As I see, the size and the content of the profiling and the tracing
output files always different. In other words, every similar page request I
send to the browser results different profiling and tracing output files.
For example if I choose the Xdebug helper's "Profile" option, and send a
page request to the server, after the response the profile output file
sometimes contains thousands of lines, but after another request it just
contains a few hundred lines. Of course I deleted the old output files
between the page requests. So the content of the profiling and tracing
output files always changes, while the server runs the same tasks. Is it
normal? Why this is happening?
2. Sometimes, I just can't find some functions in the profiling and tracing
output files, but I'm sure that they called during the page request. For
example, lets say that I have a function in my module, which called
mymodule_custom_function() for instance. I'm sure that this function called
during the page request, because this is an important (always called) part
of the service I used. After the server's response I open my profiling or
tracing output files, but I can't find the mymodule_custom_function()
function in the whole document. I don't understand. Why is that?
Finally, here are my xdebug.ini settings that maybe help:
; Xdebug debugger
zend_extension=/usr/lib/php5/20100525/xdebug.so
; Configurations
xdebug.remote_enable = 1
; - Tracer settings
xdebug.trace_format = 1
xdebug.trace_enable_trigger = 1
xdebug.trace_output_name = trace.out
xdebug.trace_output_dir = /home/nickname/Xdebug
; - Profiler settings
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_name = cachegrind.out
xdebug.profiler_output_dir = /home/nickname/Xdebug
And also some information of my local development environment:
OS: Ubuntu 13.04
PHP: 5.4.9
CPU:* *AMD A6-3400M
Thank you in advance for your help.
Balázs Wittmann
Received on Sun Oct 27 2013 - 22:27:57 GMT
This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST