Visual C++ (2008) debugging snapshot
Sometimes I need to keep track of several lines of code where variable values change on the object I am interested in. When the object ch开发者_如何转开发anges, I need to compare the variables to see what is happening, and whether it is different than expected values. This is similar to a watch window, but one that can be saved and shows the code along with it. In the watch window, you can have a bunch of variable names in order of last added (which can't be changed easily!?) with no code to show where they came from.
Currently, I am typing everything in notepad++. So, is there anyway to capture a snapshot of a few lines of code which includes the variable values?
Make a screenshot of your desktop when variables change. You'll have the code (you can select the exact code to further enhance), and the variables as a visual snapshot. The variables that just changed will also as you know be indicated with red color.
You can also resize the window smaller if you can fit all info you need, and then use shift+printscreen to make more compact snapshots.
When you have your collection of snapshots just scroll through them with a viewer and you should have a pretty neat snapshot-debug-stepping-thingy.
精彩评论