Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29002 Discussions

Variables in contained internal subprograms

chris_biddlecombe
434 Views
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.
0 Kudos
2 Replies
martymike
Novice
434 Views
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.
0 Kudos
Jeffrey_A_Intel
Employee
434 Views
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.
0 Kudos
Reply