- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to monitor one particular location in an array to see where in the code it is being "clobbered."
I tried many various IF statements, but so far nothing has isolated the problem.
wasn't there something called a WATCH command in the debugger?
Haven't used it in a long time, so not sure - is there an example somewhere ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can set a data breakpoint, that can trigger when an operation occurs on data at a certain address in memory. To add a data breakpoint the program already needs to have started running - ideally it would be paused at a normal breakpoint ahead of where you expect the clobbering, but after the point where the storage for the relevant array has been created. At this point you can use Debug > New Breakpoint > Data breakpoint, For the address you may use a fortran-like expression, such as `LOC(array(5))` - i.e. the memory location of the fifth element of the variable named array.
(Details may vary slightly depending on Visual Studio version.)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page