Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor II

Debugger: allocatable within block construct

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
Highlighted
Valued Contributor III

Welcome to the club!!

Welcome to the club!!

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

0 Kudos
Highlighted
Valued Contributor II

Thanks FF. On reflection I

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.

0 Kudos
Highlighted
New Contributor III

Hi I can confirm this

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.

0 Kudos
Highlighted
Moderator

Thank you for your report.

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

Devorah - Intel® Developer Support
0 Kudos
Highlighted

What you might try to do to

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

0 Kudos