我尝试在使用"Visual Studio 2017"平台工具集的Visual Studio 2017中使用Visual Leak Detector。我已经设置了 include 目录和 library 目录,生成调试信息也打开了。exe 的符号已经加载。
(如果我将平台工具集更改为"Visual Studio 2013",它可以正常工作)
但是,在使用"Visual Studio 2017"平台工具集时,VLD可以检测到泄漏,但无法解析行号:
Visual Leak Detector read settings from: C:\Program Files (x86)\Visual Leak Detector\vld.ini
Visual Leak Detector Version 2.5.1 installed.
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 1 at 0x005ECDB8: 400 bytes ----------
Leak Hash: 0x36672640, Count: 1, Total 400 bytes
Call Stack (TID 6284):
ucrtbased.dll!malloc()
ConsoleApplication6.exe!0x00361FAD()
ConsoleApplication6.exe!0x003618BC()
ConsoleApplication6.exe!0x00361828()
ConsoleApplication6.exe!0x00361883()
ConsoleApplication6.exe!0x00361F7E()
ConsoleApplication6.exe!0x00361DE0()
ConsoleApplication6.exe!0x00361C7D()
ConsoleApplication6.exe!0x00361F98()
kernel32.dll!BaseThreadInitThunk() + 0x12 bytes
ntdll.dll!RtlInitializeExceptionChain() + 0x63 bytes
ntdll.dll!RtlInitializeExceptionChain() + 0x36 bytes
也许有人知道如何启用行号解析。
谢谢