麻烦调用调试器的成员函数(Trouble calling member function in de

2019-10-18 05:15发布

I'm trying to call a member function of a variable from within the watch window of VS 2010. I keep getting the error, "member function not present". I've searched google and SO and arrived at these attempts:

{,,Dll}var.member()
var.{,,Dll}member()
var.{,,Dll}namespace::class::member()
{,,Dll}member(&var)
{,,Dll}namespace::class::member(&var)

None work. The errors are, respectedly:

"symbol 'var' not found"
"missing operand"
"missing operand"
"symbol 'var' not found"
"symbol 'var' not found"

However, var in the watch window works fine.

The function does exist. I can call it from code. I just can't seem to use it in a watch expression. If I could I think I could answer my somewhat related question: Viewing a pimpl from DLL in debugger

Yes, symbols are loaded. I can watch this:

{,,Dll}namespace::class::member

It results in a type I would expect.

Any ideas?

Edit: oh, and the var is of a type exported from 'Dll.dll' and imported by the current process I'm trying to debug (unit tests).

文章来源: Trouble calling member function in debugger