开发者

In my c++ program I want to examine value of some of the variables at every line of execution.

开发者 https://www.devze.com 2023-03-24 17:11 出处:网络
While executing program i find some unexpected values(not garbage values)...so I need a way to examine variables value at every line of execution.please give a detail descriptio开发者_StackOverflown o

While executing program i find some unexpected values(not garbage values)...so I need a way to examine variables value at every line of execution.please give a detail descriptio开发者_StackOverflown of how do same.


Generally, this would be done with a memory breakpoint. But since you didn't tell us what kind of debugger you were using, I can't give you specifics on how to set one of those up in your debugging tool of choice.


A "watch list" or "expression" (or "stack" or "locals" for local variables) in your debugger should tell you the value of a variable or expression at every breakpoint. If you do a "trace", after every source line is a breakpoint.

This is a perfect example of hurting you by giving what you want. What you actually need is a what @Nicol Bolas said, a memory breakpoint telling when the value of a variable changes.

0

精彩评论

暂无评论...
验证码 换一张
取 消