- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Insert a break point where the variable is used. Then by right-clicking on the red-ball you can select insert condition and type e.g. XYZ .LT. 0.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can also set a data breakpoint that will check the variable anywhere it is changed in a routine, but I like Luigi's suggestion better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See this other thread for some added discussion on breakpoints:
https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/508526
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The variable is defined in multiple places in the subprogram, so I want to cover all those places at the same time without having to insert code everywhere.
So, Steve, how is that done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is hardware support (using the debug registers of the CPU) for watching the contents of four addresses and trapping accesses to those addresses. Watching all variables in the program without localization to a specific line of code (and, even worse, watching arbitrary expressions) would be prohibitively expensive -- after every CPU/FPU instruction, the specified expression would have to be evaluated.
If you want to enable a program-wide watch on an expression, assign a variable to the expression at the beginning of a block of code that you suspect to contain a bug, be sure to update the new variable whenever any of the variables in the expression changes. You have only four arrows (DR0 to DR3) in your quiver to slay the beast.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wish I could tell you how to do this, but the VS debugger has broken data breakpoints for Fortran and I am not sure how to work around it. I need to ask our debugger developers if they know how to resolve it.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page