- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a subroutine with several internal subprograms (following CONTAINS statement). In Visual Studio, when at a breakpoint in an internal subprogram, how can I see the values of variables which are declared in the containing subroutine but also used in the internal subprogram. The syntax for module variables (module_name::variable_name) does not work.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Chris, I posed a similar question some time ago under the subject "debugger can't see host-associated vars in contained subroutines ". I was told that this was a known bug. You can check that thread for more.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As martymike says, this is a known problem with the current Windows Fortran compiler. Until we're able to fix the problem (it's somewhat complicated and involves both compiler and debugging changes), a work-around is to change your context to the containing routine (i.e., the routine where the variables are declared) and examine the variables values there. One way to do this is to view the Call Stack window and double click on the line corresponding to the location in the containing procedure where the contained procedure is called.

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