简体   繁体   English

QCacheGrind源代码路径错误

[英]QCacheGrind source code path wrong

Trying to profile my code with QCacheGrind and everything loads fine but I can't see the source code inside the program. 试图用QCacheGrind配置我的代码,一切都很好,但我看不到程序中的源代码。

For some reason the source code path is wrong. 由于某种原因,源代码路径是错误的。

Right now it is cachegrind file location + php file location 现在它是cachegrind file location + php file location

It should be only php file location 它应该只是php file location

源代码错误

This is a cachegrind bug that appears under non-linux filesystems. 这是一个出现在非Linux文件系统下的cachegrind错误。

Cachegrind will look for source files in the path where your callgrind output file is, appended to the path where your Source file is (this path is stored in the callgrind output). Cachegrind将在callgrind输出文件所在的路径中查找源文件,并将其附加到源文件所在的路径(此路径存储在callgrind输出中)。 C:/callgrind/C:/Project/src/index.php C:/ callgrind / C:/Project/src/index.php

You can work around this bug by placing your callgrind outputs in a folder directly outside your source root ( C:/Project/ ). 您可以通过将callgrind输出放在源根目录(C:/ Project /)之外的文件夹中来解决此错误。 And running a replace on your callgrind output file to delete the directory of your callgrind output from all of the source file paths, thus the callgrind output will show that your source file is at src/index.php . 并在callgrind输出文件上运行replace以从所有源文件路径中删除callgrind输出的目录,因此callgrind输出将显示您的源文件位于src / index.php。

In the end, cachegrind will join C:/Project/ and src/index.php and you will be able to view your source code in cachegrind. 最后,cachegrind将加入C:/ Project /和src / index.php,您将能够在cachegrind中查看源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM