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

Function parameters cannot always be watched in the debugger.

IgnazSchiele
Novice
125 Views

Since we switched from ifort to ifx in our company, we can no longer watch all variables in the debugger.
We have updated to version 2025.1.1 (compiling prints out ‘Compiling with Intel® Fortran Compiler 2025.1.1 [Intel(R) 64]...’):
Now we can watch significantly more variables than before.
However, we use a lot of old code and at least there it still doesn't work everywhere.
I have shortened the old code for an example so that the error still occurs and send it here. With the help of the community I have improved the description and my example.
I have tested with different versions of Visual Studio 2022: 17.0.23, 17.8.20 and 17.12.4 (17.12.4. is given as ‘supported’ by you).

Here is the description:
Function parameters cannot always be watched in the debugger.
For the example, I have created a new Fortran project, ‘Main Program Code’. In the file that is created automatically, I have deleted the code and inserted the following lines:

PROGRAM CONSOLE
implicit none
CHARACTER CTEXT*(5)
integer jnum

JNUM = 1
CTEXT = 'Hallo'

CALL DUMMY (JNUM,CTEXT)

END PROGRAM CONSOLE

SUBROUTINE DUMMY (JNUM_PARAM,CTEXT_PARAM)
implicit none
integer jnum_var, jnum_param
CHARACTER CTEXT_PARAM*(*),CTEXT_VAR*(20)

CTEXT_VAR = CTEXT_PARAM
JNUM_VAR = JNUM_PARAM

PRINT *, CTEXT_PARAM

RETURN

ENTRY DUMMY_2

PRINT *, 'Hallo'

RETURN

END

If you now set a breakpoint before line 21:
PRINT *, CTEXT_PARAM
and then build and execute the code (x64), the variables CTEXT_PARAM and JNUM_PARAM are displayed as ‘Undefined address’ in the ‘Locals’ window in Visual Studio:

parameters_undefined_address.png

It would be very nice if the developers could take a look at this.

Labels (1)
0 Replies
Reply