jokkedk/webgrind

webgrind not load profiling files

PetrHar opened this issue · 17 comments

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?

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.

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

@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 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

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?

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

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

Which browser do you use?

Which browser do you use?

Chrome
I have tested other browsers IE, Firefox

Could you provide the responses from the XHRs?

{"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}

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

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

menu

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

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

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