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

Observation: If ONLY used in subroutine then variables will NOT display in DEBUG

bmchenrync
新貢獻者 I
1,098 檢視

I was having issues with being able to view variables in Debug in VS 2022 v 2026 in certain subroutines

and couldn't figure out why?

did the ole 'all CAPS' but didn't fix it...

and then i noticed/discovered that

in VS 2022/2026

IF you use ONLY to specify the ONLY variables in a MOD used in a subroutine

then in DEBUG

VS will NOT display the variable value and in Watch window is will say undefined!

 

Once i commented out all ONLY specifications

Then ALL variables used in the subroutine reveal their values!

 

strange?

Or is this the appropriate behavior with 2026/2022

 

 

 

1 解決方案
bmchenrync
新貢獻者 I
233 檢視

With update out and some folks saying things not working and since i started this topic

I tested (why not gamble, eh?!)

DEBUG WATCH/CHECK VARIABLE VALUES WORK

Test run on my win10 computer (so expect all will work on my win11 computer too which i will check later or tomorrow)

  • Visual Studio 2026 18.5.2
  • INTEL Fortran 2026.0.0.566
  • FEE_VSIX_V17

A right mouse hover over a variable produces variable value if Module without USE statement

Module name::Variable lists value in watch window for Modules with USE statement

BRAVO!

Great work INTEL!

 

在原始文章中檢視解決方案

22 回應
Steve_Lionel
榮譽貢獻者 III
48 檢視

You should be able to click in the three dots in the upper right of your post and select Edit.

bmchenrync
新貢獻者 I
28 檢視

unfortunately not on my menu by the 3 dots when logged in

回覆