Module variables and debugging

Module variables and debugging

tmcole's picture

I am trying to view values for variables in a particular module that is used in a subroutine. All the variables that are actually used in the subroutine are available for viewing. However, any variable not used in the subroutine but present in the module is not available for viewing. Is this normal behavior? If so, why? Can I do anything so that the unused variables are available for viewing other than to include dummy assignment statements? Thanks.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Jugoslav Dujic's picture

This is supposed to be fixed in latest VF versions, yet I think (but I couldn't swear) I still see it sometimes in 6.6B. In any case, the workaround is to type

module_name::variable_name

in Watch or QuickWatch window.

Jugoslav

Jugoslav www.xeffort.com
llynisa's picture

I am reminded from this topic and Jugoslav's observations on C Strings in "Trouble with a very simple API" of a quirk of the debugger.

If one has:

Character*10  StrVar
StrVar = 'ABC123'C
StrVar(8:8) = 'X'



This displays StrVar in the debugger as 'ABC123' and the only way to see the 'X' is to display StrVar(8:).

It is clear that the debugger is C string-based, but it would have saved me a lot of grief in the past if I could have seen that there was garbage beyond the Nul. Just another warning to those mixing Fortran and C strings!

Alan

Login to leave a comment.