forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Debugging Issue with VS2019 and 8.61

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
JMoody



Joined: 26 Aug 2008
Posts: 20
Location: Ohio

PostPosted: Mon Mar 09, 2020 2:53 pm    Post subject: Debugging Issue with VS2019 and 8.61 Reply with quote

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:
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
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 444
Location: Manchester

PostPosted: Mon Mar 09, 2020 6:22 pm    Post subject: Reply with quote

Hi Jill

Did you turn on the debugger managed compatibility mode?

Tools->Options->Debugging->General->Use Managed Compatibility Mode
Back to top
View user's profile Send private message Visit poster's website
JMoody



Joined: 26 Aug 2008
Posts: 20
Location: Ohio

PostPosted: Mon Mar 09, 2020 6:26 pm    Post subject: Reply with quote

Thanks. That fixed it. I thought I had compared all the VS settings between my new and old computer, but I missed that one.
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 444
Location: Manchester

PostPosted: Mon Mar 09, 2020 6:57 pm    Post subject: Reply with quote

Previous versions of VS used to display a message box upon first debug reminding about Managed mode. Maybe they turned it off in VS2019.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group