Topic: Debug Directory?

Hi All,

I recently started using Simply Fortran and I'm having a problem with debugging. My code opens a file containing namelists which is intended to be in the same directory as the executable. I have no problem running (via Launch! or F5) my code when I set the Working Directory under Options > Launch... to the appropriate folder but I have so far been completely unable to use the debugger.

Every time I run the debugger it fails with the error:

"Fortran runtime error: Cannot open file 'simfile.nml': No such file or directory"

Solutions I have tried:

1) Moving gdb.exe to the directory with simfile.nml and setting Debugger Options > 64-bit Debugger to that path

2) Setting the debugger argument --with-seperate-debug-dir=[directory with input files]

Neither did anyting. I am open to suggestions, sorry if this question is answered elsewhere.

Re: Debug Directory?

The debugger's working directory should be the same as the launch directory.  If that's not occurring, it would be considered a bug.  Let me check that the debugger is properly switching the Working Directory.

Can you tell me what exactly you have the working directory set to in the Launch Options window?

Jeff Armstrong
Approximatrix, LLC

3 (edited by jthomas 2018-08-17 14:14:28)

Re: Debug Directory?

Hi Jeff,

Thanks for responding so quickly, the working directory is currently set to C:\Users\jthomas\Desktop\[proprietary folder name]. Running works flawlessly as long as I'm not debugging.

Re: Debug Directory?

Correction to my previous post, there is actually strange behavior when I run it as well. I just noticed after updating some values in a namelist input file that the program somehow still runs with the old values.

Re: Debug Directory?

The namelist values not updating probably represents a bigger problem.  Are the executable, namelist, and project file all in the same directory?  Just curious.

Is the working directory set to something other than the directory where the project file is located? While this should work perfectly, there may be a bug.

Jeff Armstrong
Approximatrix, LLC

Re: Debug Directory?

Hi,

Sorry for the delayed reply, I discovered that the namelist reading problem was my fault, I had hard coded the filepaths to a specific file to try and debug things that way (it didn't work as soon as I needed to read a different file). So you can ignore that.


The project file and working file are set to different directories. This works fine when launching the program (when I don't screw up and hard code file paths) through the IDE but still doesn't work with debugging. I will try making the working file the same directory as the project file and moving everything there.

7 (edited by jthomas 2019-02-05 18:27:24)

Re: Debug Directory?

O.k. Just wanted to close things up here:

The problem with Debugging appears to have been due to the size of the source being compiled. With thousands of variables, 150+ files, hundreds of functions and subroutines it seems it just overwhelmed the debugger. Smaller projects debug as expected.

Thanks for the speedy replies Jeff, and sorry it took me this long to circle back to this. P.S. I can't seem to see an option to mark this topic "answered".