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

Viewing submodule variables in the debugger?

Frank_J
Beginner
127 Views

Has anyone discovered how to view submodule variables in the debugger?

0 Kudos
7 Replies
Shiquan_Su
Moderator
109 Views

Would you please provide a solution .sln as a reproducer to showcase your issue?

0 Kudos
Nathan_Kidd
Novice
106 Views

Since IFX 2025.3 we have lost the ability to hover over variables to see their values. If you have module data exposed like this:

use module_name, only : variable_name

 You can view the variable's value in the watch window if you prepend the module variable:

module_name::variable_name

 

@Shiquan_Su , @AlexM1 provided reproduction steps that @yzh_intel confirmed. Please see this post:

community.intel.com/t5/Intel-Fortran-Compiler/Observation-If-ONLY-used-in-subroutine-then-variables-will-NOT/m-p/1747942#M178866

0 Kudos
Shiquan_Su
Moderator
105 Views

Thanks, @Nathan_Kidd .

Hi, @Frank_J , would you please test the solution in the post Nathan mentioned? If it is the same fix. I will mark this as solution.

0 Kudos
Nathan_Kidd
Novice
103 Views

Hi @Shiquan_Su , please do not consider this issue fixed. I consider prepending the module name in the watch window a workaround to an unfortunate regression in the debugging experience.

 

I hope that it is a priority for the next version of IFX and/or FEE to restore our debugging capabilities.

0 Kudos
Frank_J
Beginner
94 Views

@Nathan_Kidd describes the method for viewing module variables. As far as I can tell there is no way of viewing submodule variables. There hasn't been a consistent method since submodules were introduced in ifort. At one point it seemed that a submodule variable used in the procedure being debugged could been seen by hovering over it but I'm not sure how reliable it was and it can't be done now. I don't believe there is a way of viewing a submodule variable that corresponds to the viewing of a module variable by prepending the module name and ::.

0 Kudos
Shiquan_Su
Moderator
91 Views

I see. In this case, would you be able to create a small reproducer of a solution .sln to showcase your issue? We can start working on it from there.

0 Kudos
Frank_J
Beginner
37 Views

Attached is an example. I've checked it using ifx 2026.0.0 in VS 2022. In this example the submodule variable can be viewed from a procedure in which it is referenced but not from a procedure in which it isn't. If it were a module variable it could be viewed using the documented "specify the module name, followed by "::", followed by the variable name" but there doesn't seem to be an equivalent for submodule variables.

0 Kudos
Reply