jokkedk / webgrind

Xdebug Profiling Web Frontend in PHP
Other
3.28k stars 411 forks source link

webgrind not load profiling files #143

Closed PetrHar closed 3 years ago

PetrHar commented 3 years ago

OS: Debain 10 PHP: php7.4 Debug version: v3.0.4 Webgrind version: 1.8 Config xdebug: `zend_extension=xdebug.so xdebug.mode=profile xdebug.start_with_request=trigger

xdebug.output_dir = /tmp`

The profile file is created at a folder /tmp. After pressing the update button in the webgirnd, the following will be displayed: Loading... Loading information from server. If the callgrind file is large this may take some time.

And no files will be loaded. Where is the problem please?

francoisjacquet commented 3 years ago

I have somewhat the same configuration as @PetrHar

; Webgrind (Xdebug profiling)
xdebug.mode = develop,profile
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = /tmp

The issue is a bit different though: The cachegrind.out file data is displayed well, but when clicking on any arrow to expand (toggleCallInfo), the "Loading..." message is displayed and the computer freezes shortly after.

Tested with webgrind 1.7.0 too, same issue.

alpha0010 commented 3 years ago

Difficult to find time to develop a project I am not actively using, but I will try to take a look sometime this week.

kaihaase commented 3 years ago

@PetrHar for xdebug version 3 you need to change line 138 of config.php (in version 1.8.0 of webgrind): $dir = ini_get('xdebug.profiler_output_dir'); => $dir = ini_get('xdebug.output_dir');

see https://xdebug.org/docs/upgrade_guide#changed-xdebug.profiler_output_dir

PetrHar commented 3 years ago

@PetrHar for xdebug version 3 you need to change line 138 of config.php (in version 1.8.0 of webgrind): $dir = ini_get('xdebug.profiler_output_dir'); => $dir = ini_get('xdebug.output_dir');

see https://xdebug.org/docs/upgrade_guide#changed-xdebug.profiler_output_dir

I edited the line, the result is the same

kaihaase commented 3 years ago

I edited the line, the result is the same

I had the same problem, but was able to fix it with this. But of course it can have several causes. Which error message is displayed in the Console of the browser? Which responses do the XHR requests in the Network deliver?

PetrHar commented 3 years ago

Console: ncaught TypeError: Cannot read properties of undefined (reading '4') at getCachedSortType (jquery.tablesorter.js:482) at multisort (jquery.tablesorter.js:436) at HTMLTableElement.<anonymous> (jquery.tablesorter.js:617) at HTMLTableElement.handle (eval at <anonymous> (jquery.js:11), <anonymous>:1:26157) at HTMLTableElement.eval (eval at <anonymous> (jquery.js:11), <anonymous>:1:23905) at Object.trigger (eval at <anonymous> (jquery.js:11), <anonymous>:1:25523) at HTMLTableElement.eval (eval at <anonymous> (jquery.js:11), <anonymous>:1:28478) at Function.each (eval at <anonymous> (jquery.js:11), <anonymous>:1:8461) at init.each (eval at <anonymous> (jquery.js:11), <anonymous>:1:1089) at init.trigger (eval at <anonymous> (jquery.js:11), <anonymous>:1:28454) XHR: image

PetrHar commented 3 years ago

Console: ncaught TypeError: Cannot read properties of undefined (reading '4') at getCachedSortType (jquery.tablesorter.js:482) at multisort (jquery.tablesorter.js:436) at HTMLTableElement.<anonymous> (jquery.tablesorter.js:617) at HTMLTableElement.handle (eval at <anonymous> (jquery.js:11), <anonymous>:1:26157) at HTMLTableElement.eval (eval at <anonymous> (jquery.js:11), <anonymous>:1:23905) at Object.trigger (eval at <anonymous> (jquery.js:11), <anonymous>:1:25523) at HTMLTableElement.eval (eval at <anonymous> (jquery.js:11), <anonymous>:1:28478) at Function.each (eval at <anonymous> (jquery.js:11), <anonymous>:1:8461) at init.each (eval at <anonymous> (jquery.js:11), <anonymous>:1:1089) at init.trigger (eval at <anonymous> (jquery.js:11), <anonymous>:1:28454) XHR: image

kaihaase commented 3 years ago

Which browser do you use?

PetrHar commented 3 years ago

Which browser do you use?

Chrome I have tested other browsers IE, Firefox

kaihaase commented 3 years ago

Could you provide the responses from the XHRs?

PetrHar commented 3 years ago

{"functions":[],"summedInvocationCount":0,"summedRunTime":0,"dataFile":null,"invokeUrl":"","runs":0,"breakdown":{"internal":0,"procedural":0,"class":0,"include":0},"mtime":"2021-09-08 09:09:32","linkToFunctionLine":false}

kaihaase commented 3 years ago

Are there any entries in the DataFile Select (select box with default option "Auto (newest)" in the menu)?

PetrHar commented 3 years ago

Unfortunately, I can't find the menu. Can you direct me?

kaihaase commented 3 years ago

menu

PetrHar commented 3 years ago

It's functional. Thank you very much for your help.

kaihaase commented 3 years ago

You're welcome, but what exactly was the problem / solution?

PetrHar commented 3 years ago

Just edit that line 138. Then I tested it wrong. I didn't select the debug file from the menu.