jokkedk/webgrind

Unable to generate call graph on Windows

avelican opened this issue · 0 comments

tl;dr: turns out Windows paths (for use in shell_exec) must be written with (escaped) backslashes, forward slashes won't work.


When I try to generate a call graph, I get this:

Unable to generate C:\Users\funny\AppData\Local\Temp/__XDEBUG_TRIGGER.1649994382.out-10.webgrind.svg via python: C:/Users/funny/AppData/Local/Programs/Python/Python39/python.exe and dot: "C:/Program Files/Graphviz/bin/dot.exe". Please update config.php.

As you can see I added the full paths to the config file already.

I also installed gprof2dot via pip and tested that it works.

It looks like I did everything in the installation instructions, and I can't find anything else in the config file that looks relevant, so I'm not sure what else to do.


Update: fixed it by changing my paths from / to \\, eg.

static $dotExecutable = 'C:\\Program Files\\Graphviz\\bin\\dot.exe';

Noob mistake on my part, (turns out forward slashes almost always work on Windows ;) but I'm leaving this here in case someone else runs into the same problem.