I'm using VS Code and particularly the "PHP" extension to open cachegrind files that I have xdebug generating. When I open the file in Qcachegrind, it shows everything correctly including call times. But opening the profile file in VS Code shows all call times as "0.00ms". Why could this be?
Asked
Active
Viewed 101 times
1
-
That sounds odd, can you share a couple of dozen lines from your cachegrind file? How old is your VS Code? – Derick Apr 18 '23 at 08:05
-
My VS Code tends to keep itself up to date, so should be the latest. It's 1.77.3. Here's some of my cachegrind file: `version: 1 creator: xdebug 2.8.1 (PHP 7.4.0-dev) cmd:
\organisations.php part: 1 positions: line events: Time Memory fl=(1) php:internal fn=(1) php::trim 3 1 0 fl=(1) fn=(2) php::session_start 2 249 6480 fl=(1) fn=(3) php::ob_start 3 1 16664 fl=(1) fn=(4) php::error_reporting 4 0 408 fl=(2) – Jeremy M Apr 18 '23 at 09:29includes\classes\database.class.php fn=(5) require_once:: includes\classes\database.class.php 1 2 0`
1 Answers
0
Your Xdebug version is no longer supported. Only Xdebug 3 is. I can't see anything wrong with your cachegrind file (mostly, because it's all squished in one line), so I would recommend you file a bug report with the VS Code PHP Plugin people: https://github.com/xdebug/vscode-php-debug/issues

Derick
- 35,169
- 5
- 76
- 99
-
Thanks, and apologies for the smushed-together cachegrind file! I'll look at getting everything up to date rather than lodging bugs for unsupported versions. – Jeremy M Apr 23 '23 at 03:35