Silverfrost Forums

Welcome to our forums

Debugging Issue with VS2019 and 8.61

9 Mar 2020 1:53 #25061

I am having problems with using the 8.61 plugin for VS2019. I cannot see the values of passed variables in functions or subroutines.

I have made a small project that shows the problem. You can download the project here: http://files.unitedmcgill.com/owncloud/index.php/s/qgw12bc5HcrXjjJ

Basically, we have a C# project that calls a method in a Fortran DLL. That method will call other subroutines/functions to do calculations. When you put a breakpoint in, you can see the values of variables that have been declared in the current method, but you cannot see the values that have been passed into the current method.

Here is the Fortran code:

      FUNCTION CALC_AREA(CSharpInput)
      IMPLICIT NONE
      ASSEMBLY_INTERFACE(NAME='Calc_Area')

!--   Passed Variables
      OBJECT('FTNDebugTest.DataContract.ClassInput') CSharpInput

!--   Local Variables
      OBJECT('FTNDebugTest.DataContract.ClassOutput') CALC_AREA
      OBJECT('FTNDebugTest.DataContract.ClassOutput') CSharpOutput
      REAL WIDTH, HEIGHT, AREA

      WIDTH = CSharpInput%Width
      HEIGHT = CSharpInput%Height
      CALL CALCAREA(WIDTH, HEIGHT, AREA)

      CSharpOutput = new@('FTNDebugTest.DataContract.ClassOutput')
      CSharpOutput%Area = AREA
      CALC_AREA = CSharpOutput

      RETURN
      END

!  --------------------------------------------------
      SUBROUTINE CALCAREA(WIDTH1, HEIGHT1, AREA1)
      IMPLICIT NONE
      REAL WIDTH1, HEIGHT1, AREA1

      AREA1 = WIDTH1*HEIGHT1

      RETURN
      END

When I put a breakpoint at the call to CALCAREA, I can see the values of WIDTH, HEIGHT, and AREA. When I step into CALCAREA, I get the error CS0103: The name 'WIDTH1' does not exist in the current content. for all the passed variables.

When I open the exact same project under VS2013/8.05, I can see the values of the passed variables just fine.

Jill

9 Mar 2020 5:22 #25064

Hi Jill

Did you turn on the debugger managed compatibility mode?

Tools->Options->Debugging->General->Use Managed Compatibility Mode

9 Mar 2020 5:26 #25065

Thanks. That fixed it. I thought I had compared all the VS settings between my new and old computer, but I missed that one.

9 Mar 2020 5:57 #25066

Previous versions of VS used to display a message box upon first debug reminding about Managed mode. Maybe they turned it off in VS2019.

Please login to reply.