Welcome to the TRNSYS Users Forum.

The forum is a place where people can interact and have discussions about different topics involving the use of the TRNSYS software package. Here you can post topics for discussion or questions on using TRNSYS and get advice from other users or TRNSYS experts. This forum is not intended for detailed technical support. Users should contact their distributor’s hotline for such assistance.

Some tips for success on using the forum:

  • Follow the Forum Rules posted in Forum Administration.
  • There are categories for different types of topics and questions. Post your topic or question into the proper category.
  • Before posting a topic or question search the existing topics  (and the TRNSYS Users listserv archive or Post archive) to see if a similar topic or question has already been answered.
  • Use a descriptive topic name. Don’t use attention getting subjects, they don’t get attention and only annoy people.
  • State the version of TRNSYS and which add-ons your are using.
  • Include enough specific details for your topic of question to be answered. Just posting “Why am I getting an error?” without describing the specific error and what you are trying to do when you get the error will not receive a response that fixes your issue.
  • Remember when people help you, they are doing you a favor. Be patient, help people out by posting good descriptions of what you need help with, and be polite even if a response does not solve your issue.
  • Moderators may edit your post for clarity or move your topic to a more appropriate category.

Notifications
Clear all

Debug mode does not show variables value in Visual Studio

4 Posts
3 Users
0 Reactions
429 Views
0
Topic starter

Hi all TRNSYS users,

 

I am trying to debug my Fortran TRNSYS new type code with MS visual studio 2022.

As I am debugging, I would like to check the value of variables, but I am unable to do so. It is due to the fact that the autos, local, and watch windows in Visual Studio do not show any variables. I also hovered the mouse cursor over the variables, but nothing appeared. I have attached a screenshot for your reference.

 

If anyone can help me in this matter, it would be greatly appreciated.

 

Best Regards,

Ali

DavidBradley 23/08/2023 3:22 pm

@alish if you just write a simple "hello world" kind of program in Fortran using the Visual Studio then can you hover over variables and see their values? The idea is to see if the problem is specific to the compile project (*.sln) that is provided with Trnsys or whether there is something strange about your version of the Visual Studio and/or Intel compiler.

3 Answers
0

Hello Ali,

I am not sure why hovering the mouse cursor over the variables does not show anything. 

If you click on the 'Watch 1' tab in the lower left (to the right of the Autos and Locals tabs), you should see a line in italics that says 'Add item to watch.' Click on that line, type the name of a variable in your project, and hit Enter, and you should see that variable and its current value appear in the list. Repeat for as many variables as you wish to monitor. Click on a line and hit the Delete key to remove a variable from the list.

You should also be able to click on the 'Locals' tab to see current values for all of the local variables in the project, though I find that view a bit overwhelming. 

0
Topic starter

Hello David,

Thank you for your response.

I wrote a simple Fortran program using the Visual Studio and then hovered over variables. Unfortunately, I was not able to see their values. It seems that the problem is specific to the version of the Visual Studio (2022 - latest version) that I have installed.

I would like to know if there is an older version of Visual Studio that would be compatible with TRNSYS 18.

Also, it would be great if you could tell me how to access and download the older versions of Visual Studio freely.

Best Regards,

Ali

0

@alish See the second comment on this post for instructions to download older versions of Visual Studio : https://trnsys.org/community/standard-forum/floating-point-error-in-trnsys/#post-23 . I use Visual Studio 2019 on one of my machines and Visual Studio 2022 on the other. So far I haven't noticed that they behave differently with respect to debugging TRNSYS, but if VS 2022 isn't working I would try VS 2019.

Share: