Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
2 Views

Viewing variables in a module while debugging (MSVS 2015)

When debugging a subroutine contained within a module, the variables that are within the scope of that subroutine but not declared within the module subroutine are not visible with the debugger. This makes debugging very inconvenient if not impossible when using modules. Is there a setting that can make them visible or any other solution to this problem?

0 Kudos
2 Replies
Highlighted
Valued Contributor II
2 Views

The normal behaviour is that

The normal behaviour is that only variables from the module that are used in the subroutine are visible. To add other variables to the watch list you need the syntax modulename::varname

If all module variables we all shown by default there would be too much information overload in many cases.

0 Kudos
Highlighted
Beginner
2 Views

I am assuming that you are

I am assuming that you are working in an interactive debugging session:

Have you tried hovering the cursor over an occurrence of the variable in the procedure when stepping through the execution of that procedure? The variable name and its value(s) should immediately appear in a 'hover box' displayed at that location (much like a 'tooltip').

With modules, I have found that this technique always works with use association, but I have not tried it for host association.

JCHayen
0 Kudos