hexagon logo

How to debug Easy5 with Visual Studio?

I have the following installed (this is also the order of installation) Intel Fortran 2017, Visual Studio 2017 and Easy5 2018. Easy5 compiles with the intel compiler using either the standard or debug options. When I compile with debug I can analyze using the "Debug the current analysis" button and Visual Studio launches. When VS loads the "Start" button is available but the source code is not. VS can display the assembly if desired but that is not useful for me. The users guide says I should open the source file that is named <model name>.f. This file can be opened fine in the IDE but the debugger doesn't use it. I can't set breakpoints in eqmo that actually work. Upon pressing start the program will run and exit without triggering the breakpoint.
What do I need to do to properly setup debugging with VS and Easy5?
  • Yes, when you start the debugger, you will need to manually load the modelname.f file. Then you can set the breakpoints in the code (subroutine EQMO).
     
    So just to be sure you are doing things correctly, here's the procedure:
    • Turn on Debug mode in Easy5.
    • Compile the model in debug mode
    • Run the analysis in debug mode.
    • Visual Studio will launch.
    • Set the exception handling options if needed.
    • Manually open the modelname.f file
    • Right click on the first line of the code (Subroutine EQMO) and set a breakpoint
    • Set any other breakpoints in the code you desire.
    • Select the Run or Continue button
    • The debugger should then step through the code.
     
    Try this again and let me know at which point this fails for you.
  • Rick thank you. I tried again, after failing so many times before with those same steps and it worked. I think the difference was you noted select "Run" which wasn't the option given to me by VS. It presented "Start". Choosing "Start Debugging" from the Debug menu seemed to be the key I was missing. Thank you. I have shown my steps below.
     
    1) Open model
    2) Build -> Debug Mode (checked)
    3) Build -> Create Executable (Mode executable created successfully (for use in debug mode), build log confirms)
    4) Analysis -> Execute/Debug (VS launches)
    5) From VS File -> Open -> <model_name>.f (not <model_name>.datain.f)
    6) Scroll down to first assignment line past all the variable declarations and such, assign breakpoint
    7) Debug -> Start Debugging