Fortran Is an IDE Necessary for Debugging Fortran Code?

  • Thread starter Thread starter Saladsamurai
  • Start date Start date
  • Tags Tags
    Eclipse Fortran
AI Thread Summary
The discussion centers on troubleshooting issues with building a Fortran project in Eclipse after switching from C++. The user experiences difficulties related to the Makefile, which is empty, and questions its necessity, noting that modern languages often do not require explicit Makefiles. The conversation reveals that the user has gfortran installed but faces a PATH environment issue, preventing Eclipse from locating the compiler. Suggestions include running Eclipse from the terminal to inherit the correct PATH and ensuring the correct directory is set for building the project. The thread highlights the importance of correctly configuring the development environment for successful compilation and debugging of Fortran code.
  • #51
I like Serena said:
Yep. Try Browse all the way to the binary.
Ok. Should I 'Apply' or 'Run' ? I am thinking Apply, then Run if necessary.

Btw, Search project should work, but we'll see... just keep an eye out for weird stuff.

Yeah. Search Project definitely not working. You can see that the window it gave me is empty.
 
Technology news on Phys.org
  • #52
Yeah, do Apply first and then Run.

What is the path to your binary?
Does it contain a space?
 
  • #53
I like Serena said:
Yeah, do Apply first and then Run.

I can't believe that this worked! All that work for a simple Hello World.

What is the path to your binary?
Does it contain a space?

Code:
/Users/saladsamurai/Documents/workspace_PTP/HelloWorldProject/Debug/HelloWorldProject

No spaces.

Now I am wondering what I will need to do every time I create a new project. I will create a HelloWorld2 project to see what Eclipse "remembers" and what it forgets.

Thanks SO MUCH for all of your effort ILS! Next time you're in the US I'll buy you a coffee :smile:
 
  • #54
Cheers! :smile:
 
  • #55
I like Serena said:
Cheers! :smile:

Now for the hard part: Getting C++ and Java to work in the same IDE! I am pretty sure C++ is ready to go. But I had some trouble with Java... I'll mess around a bunch and post back with my findings!
 
  • #56
Or, you could save yourself a lot of grief by

1. Learn how to use "make"
2. Learn how to configure your favorite text editor to run "make" with a single keystroke
3. Never use an IDE again ...

Everybody who writes an IDE seems to have their own ideas about what is "easy and intuitive". And none of them ever match MY ideas about what is easy and intuitive!
 
  • #57
AlephZero said:
Or, you could save yourself a lot of grief by

1. Learn how to use "make"
2. Learn how to configure your favorite text editor to run "make" with a single keystroke
3. Never use an IDE again ...

Everybody who writes an IDE seems to have their own ideas about what is "easy and intuitive". And none of them ever match MY ideas about what is easy and intuitive!

Indeed! How do you debug without an IDE?
 
  • #58
It appears that I have to navigate to the path manually every time and set up run configurations. I am still convinced that when I click on 'search project' Eclipse should be 'seeing' the binary it just created, but as in Post #49 in the 2nd screenshot, it is not seeing it.

When I click 'Search Project' could it be looking on the wrong path? I am assuming that Eclipse must be looking on what is referred to as the "Build Path." There must be a way to check what it thinks the Build path is...
 
  • #59
Eclipse keeps a cache in which it remembers what it has built.

When you build an executable using the terminal window, you typically get this problem that Eclipse doesn't "see" the executable with "Search project".

The way I know to recover from that, is to let Eclipse rebuild everything (Ctrl+B).Anyhow, after the first time you adjusted the run configuration, Eclipse will remember the location of the executable.
 
  • #60
Saladsamurai said:
Indeed! How do you debug without an IDE?

An IDE doesn't debug your code for you.

You debug code by thinking. and playing with an IDE is often a distraction from that.

Of course you need a debugger to tell you the basic information like where your code crashed. But 99% of the time you can get all the information you need from a core dump and a stack trace, wthout the pretty graphics.
 
  • #61
AlephZero said:
An IDE doesn't debug your code for you.

You debug code by thinking. and playing with an IDE is often a distraction from that.

Of course you need a debugger to tell you the basic information like where your code crashed. But 99% of the time you can get all the information you need from a core dump and a stack trace, wthout the pretty graphics.

I AlphaZero! :smile: I was just messing around with XCode and I noticed the term GDB everywhere. So I looked it up. It's a debugger! So yes, I understand now that an IDE is not a debugger.

So let's say for a second that I want to get into programming without an IDE. So I would need to learn about these things that you mentioned: core dump, stack trace and probably other things as well. Are these things that are generated by the 'debugger' (e.g. GDB)?
 
  • #62
AlephZero said:
An IDE doesn't debug your code for you.

You debug code by thinking. and playing with an IDE is often a distraction from that.

Of course you need a debugger to tell you the basic information like where your code crashed. But 99% of the time you can get all the information you need from a core dump and a stack trace, wthout the pretty graphics.

I kind of like point-and-click, multiple-views and language-sensitive-keyboard-shortcuts to make it easier to find compiler errors and to debug code. :)

To find problems in mathematical formulas I agree that an IDE tends to distract.
 

Similar threads

Replies
4
Views
2K
Replies
8
Views
4K
Replies
59
Views
11K
Replies
16
Views
2K
Replies
29
Views
6K
Replies
16
Views
2K
Replies
1
Views
2K
Replies
1
Views
3K
Back
Top