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

oneAPI IFC VS Integration: 'this' is not visible when debugging

Deniz_S_
Beginner
1,485 Views

Hi all,

I'm currently using IFC18 with VS 15.6.7, all is working fine.

In my attempt to upgrade, I have installed VS 2019(16.8.4) and the oneAPI IFC (2021.1.1.99).

No problems with compiling/linking/executing code, however, when I try to run in debug , 'this' or 'this%SOMEDATA' is not visible anymore. In the watch window I get the following message:

'this' may only be used inside a nonstatic member function

similarly, data type pointers are invisible too, with the following message:

identifier "data_type_pointer" is undefined

Any associated data with the pointer can passed into routines and viewed fine there.

Thanks

 

0 Kudos
1 Solution
Barbara_P_Intel
Employee
1,380 Views

A solution to this issue with oneAPI HPC Toolkit of not being able to debug Fortran using VS without installing GDB is in the works. Stay tuned!



View solution in original post

6 Replies
PrasanthD_intel
Moderator
1,437 Views

Hi Deniz,


We have a dedicated forum for Fortran related issues Intel® Fortran Compiler - Intel Community. We are redirecting this issue to that forum.


Regards

Prasanth


0 Kudos
jimdempseyatthecove
Honored Contributor III
1,415 Views

I've never seen that message. That said, the error message appears to be pertinent to C++ language, not Fortran. You may be seeing an issue with the integration with the MSVS IDE. On an off-shot, try using:

    THIS%SOMEDATA

IOW Fortran symbols are all uppercase (up-cased).

Also, the Watch window uses the context of the focus in the Call Stack window. Open that window to assure that the highlighted line is referencing that of the source window you are looking at. If not, you can double click to change focus.

Jim Dempsey

0 Kudos
Deniz_S_
Beginner
1,405 Views

Thanks Jim, making everything uppercase in the watch window works.

Similarly, mouse hover type expansion would only work if the symbol is in uppercase, which means all lowercase defined symbols (pointers in my case, mainly for visualisation) in the code will need to be made uppercase. Not desirable.

Clearly some setting had changed, as this had not been an issue with my current setup. I wonder if it is user configurable.

0 Kudos
Steve_Lionel
Honored Contributor III
1,398 Views

You need to install "Intel Distribution for GDB" from the oneAPI Base Toolkit, as it is this component that supplies the Fortran debugging support in Visual Studio. I have complained to Intel about this - especially as it forces you to install a bunch of other things you won't use.

 
0 Kudos
Deniz_S_
Beginner
1,391 Views
0 Kudos
Barbara_P_Intel
Employee
1,381 Views

A solution to this issue with oneAPI HPC Toolkit of not being able to debug Fortran using VS without installing GDB is in the works. Stay tuned!



Reply