invoking functions while debugging with Visual Stu

2019-06-16 11:34发布

Here's something I know is probably possible but I've never managed to do
In VS2005(C++), While debugging, to be able to invoke a function from the code which I'm debugging.
This feature is sometimes essential when debugging complex data structures which can't be explored easily using just the normal capabilities of the watch window.
The watch window seem to allow writing function calls but every time I try it it gives me one error or another.

Error: symbol "func" not found
Error: argument list does not match function
Error: member function not present

Did anyone ever succeed in making this work properly? What am I missing here?

Edit: clearly, the function called should be a symbol that exists in the current scope the debugger is in.

7条回答
Lonely孤独者°
2楼-- · 2019-06-16 12:31

We find this works in a very hit and miss manner. Some very simple functions (incl. member functions) work, typically simple property getters. Other more complex functions don't work and give an error.

I've never been able to discern the precise rules ...

查看更多
登录 后发表回答