VS2017 中的_crtBreakAlloc

_crtBreakAlloc in VS2017

我尝试使用 CRT 找出内存泄漏。我正在使用 Visual Studio 2017 社区。 我关注了official help, 但它不起作用。

我在 Watch window 中尝试了不同的输入方式。这就是我得到的:

_crtBreakAlloc identifier "_crtBreakAlloc" is undefined

我尝试了在 中找到的建议并得到了相同的结果:

(int*){,,ucrtbased.dll}_crtBreakAlloc identifier "_crtBreakAlloc" is undefined

(int*){,,ucrtbased.dll}__crtBreakAlloc identifier "__crtBreakAlloc" is undefined

调试构建、运行时库多线程调试 DLL (/MDd)。

我试过调用函数 _CrtSetBreakAlloc,它起作用了。

那么重新编译调用这个函数是唯一的选择吗? 还是我遗漏了一些明显的东西?

尝试:

{,,ucrtbased.dll}_crtBreakAlloc

确保已加载符号(工具/选项/调试/符号)。