- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do I set a breakpoint in the debugger so that the program stops if a module variable changes anytime during execution?
Thank you
Thank you
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Visual Studio
Debug | Windows | Breakpoints | New | New Data Breakpoint
Jim Dempsey
Debug | Windows | Breakpoints | New | New Data Breakpoint
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am a bit confused...I add breakpoints using the "F9" key at the line or simply by clicking on the left most column (beyond line numbers) or by using Debug | Toggle Breakpoint.
On VS2005 there is Debug | New Breakpoint | New Data Breakpoint. Windows--> Breakpoint just takes you to the Breakpoint window. Importantly, however, the New Data Breakpoint option remains greyed out while Break at Function is black. What am I missing?
I set the breakpoint conditions by right clicking the breakpoint in the leftmost column and selecting the appropriate dropdown entry.
For breaking due to change in value, I use the method mentioned by Jim and Jugoslav here: http://software.intel.com/en-us/forums/showthread.php?t=74575&o=d&s=lr
Abhi
I am a bit confused...I add breakpoints using the "F9" key at the line or simply by clicking on the left most column (beyond line numbers) or by using Debug | Toggle Breakpoint.
On VS2005 there is Debug | New Breakpoint | New Data Breakpoint. Windows--> Breakpoint just takes you to the Breakpoint window. Importantly, however, the New Data Breakpoint option remains greyed out while Break at Function is black. What am I missing?
I set the breakpoint conditions by right clicking the breakpoint in the leftmost column and selecting the appropriate dropdown entry.
For breaking due to change in value, I use the method mentioned by Jim and Jugoslav here: http://software.intel.com/en-us/forums/showthread.php?t=74575&o=d&s=lr
Abhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah! I missed the simple fact that I need to "start debugging" before "New Data Breakpoint" becomes active....
See: http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/win/compiler_f/bldaps_for/win/bldaps_use_brpts.htm
Abhi
See: http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/win/compiler_f/bldaps_for/win/bldaps_use_brpts.htm
Abhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Thanks - it works, once one knows where it is.
If anyone from Intel is listening, here are some observations:
1. New user looking for the debugger manual, tries "help". Only obvious mention of a debugger is the "enhanced debugger for threaded applications". Not obviously what one needs in order to find out how to set a simple breakpoint. After posting question on the forum, eventually find debugger instructions buried at the third level of the Fortran manual. This is not exactly where one would expect to find it.
2. Instructions for "New data breakpoint" explicitly say not to use a Fortran variable name, but to convert to C++ address - e.g. loc(a(5)). Uninitiated user blindly goes and uses a variable name anyway (not knowing any better), and it works.
3. Well, it sort of works. If the breakpoint is set for a variable of a defined type (e.g. a%b), and you (try to) set the breakpoint to a%b (which happens to be an address since "b" is defined to be an integer), you get an error message saying this is not an address. If you set the breakpoint to be simply "a", it works, although this is not really an address. It turns out that the program breaks at the address of the first entry of the defined type "a". What would happen if a breakpoint at a%c was required?
4. The nomenclature "New Data Breakpoint" is confusing for a new user. Try "New Variable Breakpoint", or "New Symbol Breakpoint" or maybe "New Breakpoint for variables" all of which might mean something.
Thanks again to those who answered.
Thanks - it works, once one knows where it is.
If anyone from Intel is listening, here are some observations:
1. New user looking for the debugger manual, tries "help". Only obvious mention of a debugger is the "enhanced debugger for threaded applications". Not obviously what one needs in order to find out how to set a simple breakpoint. After posting question on the forum, eventually find debugger instructions buried at the third level of the Fortran manual. This is not exactly where one would expect to find it.
2. Instructions for "New data breakpoint" explicitly say not to use a Fortran variable name, but to convert to C++ address - e.g. loc(a(5)). Uninitiated user blindly goes and uses a variable name anyway (not knowing any better), and it works.
3. Well, it sort of works. If the breakpoint is set for a variable of a defined type (e.g. a%b), and you (try to) set the breakpoint to a%b (which happens to be an address since "b" is defined to be an integer), you get an error message saying this is not an address. If you set the breakpoint to be simply "a", it works, although this is not really an address. It turns out that the program breaks at the address of the first entry of the defined type "a". What would happen if a breakpoint at a%c was required?
4. The nomenclature "New Data Breakpoint" is confusing for a new user. Try "New Variable Breakpoint", or "New Symbol Breakpoint" or maybe "New Breakpoint for variables" all of which might mean something.
Thanks again to those who answered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the comments. The user interface for the debugger is provided by Visual Studio. so we have no control over that. I'll pass your documentation comments on to our writers. However, when I look at the help and type "debug" into the Index field, I see quite a few entries that seem relevant, even for "Debugging", which includes a subtopic "Fortran debugging example". Were you perhaps looking at some other "help"?

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