Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26731 Discussions

Debugger: allocatable within block construct

andrew_4619
Honored Contributor I
163 Views

I have an allocatable integer array declared and allocated within a block construct. Whilst the code works OK the debugger says it is an undefined variable and will thus not evaluate it. Is this a known problem? Visual Fortran Compiler 19.0.4.245/  Microsoft Visual Studio Community 2017 
Version 15.9.15

0 Kudos
5 Replies
FortranFan
Honored Contributor II
163 Views

Welcome to the club!!

I've been long disappointed to find this issue persist in the integration with Visual Studio.

andrew_4619
Honored Contributor I
163 Views

Thanks FF. On reflection I think I have seen this before.  Is there a bug report filed? As we all know bugs have zero visability these days.

Johannes_Rieke
New Contributor III
163 Views

Hi I can confirm this uncomplete integration of VS debugger. I filed in the past many of these issues. But I gave up... With every new VS version new things come up or old issues are back. If you will be brave and have the time, you should file this bug.

As FF suggested in another thread, Intel would make many friends, if they will support VS code integration officially.

Devorah_H_Intel
Moderator
163 Views

Thank you for your report. This case is escalated to engineering for a fix.

jimdempseyatthecove
Black Belt
163 Views

What you might try to do to aid in debugging is either

a) In the block, after allocation, add ASSOCIATE(dYourArray => YourArray), then examine the data using dYourArray
or
b) in the outer scope add as an example: REAL, POINTER :: dYourArray(:)
    and in the local block add TARGET attribute to YourArray. and after allocation add dYourArray => YourArray

One of the two methods should get you by until bug is fixed.

Jim Dempsey

Reply