Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xdebug profiler is not working?

Tags:

I using XAMPP and I have configure it in order to have virtual hosts for each project I create localy.

In my php.ini I have enabled xdebug, and my scripts are working properly. I mean that any time there is a warning, notice, error, are reported by the xdebug.

Now I would like to enable the Xdebug profiler, and I have make the following changes into my php.ini in order to allow the Xdebug profiler to generate the log file:

; xdebug.profiler_enable ; Type: integer, Default value: 0 ; Enables Xdebugs profiler which creates files in the profile output directory. Those files can be ; read by KCacheGrind to visualize your data. This setting can not be set in your script with ini_set ; (). xdebug.profiler_enable = 1  ; xdebug.profiler_output_dir ; Type: string, Default value: /tmp ; The directory where the profiler output will be written to, make sure that the user who the PHP ; will be running as has write permissions to that directory. This setting can not be set in your ; script with ini_set(). xdebug.profiler_output_dir ="D:\Web Development Projects\Profile" 

I restart my Apache, but still when I run my scripts there is no file generated in folder Profile.

Is there anything else I have to do ?

I have read that in order to enable the Profiler : http://xdebug.org/docs/profiler


After some research, I add that code at the end of the index.php in a WordPress installation I have in my server:

echo xdebug_get_profiler_filename(); 

After I run my WordPress, at the footer I get that result:

D:/Web Development Projects/Profile/xdebug_profile._::1320916508_018294 

but when I go to the folder

D:/Web Development Projects/Profile/ 

the file is not appeared there ? Any idea ?

like image 862
KodeFor.Me Avatar asked Nov 10 '11 08:11

KodeFor.Me


1 Answers

First of all, you need to make sure that the user under which your webserver runs at actually has write permissions to the directory that you specified— and it needs to exist. It is also possible that Xdebug doesn't like spaces in paths, Although that should work just fine, I would try setting:

xdebug.profiler_output_dir = "D:/Web Development Projects/Profiler" 

As the \ + char might be an escape sequence.

like image 183
Derick Avatar answered Sep 30 '22 12:09

Derick