pgdbg GUI versus FreePascal IDE


Today I made my first serious attempt to work with pgdbg. My fortran code is mostly legacy and it simply took me too long to eliminate errors by adding and removing write-statements all the time. I just changed all the -O3 options in the makefiles into -g and recompiled and linked. The resulting program is called from a scriptfile that also sets some environment variables and passes commandline parameters to the executable. In the scriptfile I just added the name “pgdbg” in front of the name of the executable. Then I ran the scriptfile and pgdbg shows the sourcecode of the main program.

So far so good it seems.

–> polite question: How can I put a breakpoint at a given line of source that is in view in pgdbg using just the pgdbg gui? Is there a shortkey? I only found out that “Options -> Set breakpoint” asks for the name of the routine where I would like to place a breakpoint. I was not asked at which line the breakpoint should be placed!

Next, I just accepted the breakpoint at the beginning of the routine, which now was marked by a red dot, and I tried to run the program from within pgdbg by pressing the green “run” button. Nothing seems to happen.

–> polite question: What am I doing wrong?

I get the impression that pgdbg is a powerful tool, but that its gui is (very) limited in functionality. Background: I am a spoilt user of pgdbg. Two decades of coding PASCAL in both the Borland IDE (Integrated Development Environment) and in the FreePascal IDE have put a strong mark on my way of working. I don’t see the debugger as a tool to remove errors, but as a supportive tool to monitor execution, even when all is going well.

–> Rude/indecent question: Would you please for one time do me a favour and download the FreePascal install package for Windows, freeware under gpl at:
and double click on the icon that is placed on the desktop after installation of the package? FreePascal has a decent uninstall menu-item in the Start–>programs menu, so you can easily and fully get rid of it afterwards. The FreePascal IDE is a clone of the old Borland IDE, which stems from the '80-s of the former century. This is the type of environment that allows for fast, really fast, development of programs. No need to type in intricate debug commands. Direct visual feedback. All functionality accessible both via the menu and via shortkeys. Is there a chance that pgdbg will have a gui with equally powerful functionality in the 21-st century?

Thanks for answering the polite questions and, in case the “rude/indecent” proposal offends you, my apologies.



Okay, the answer to the first question appeared to be: “Click in the eventcolumn at the sourceline where you want to place your breakpoint”. What remains is my wish to do this with a key-stroke.

The answer to the second question is: "You cannot just add the name pgdbg in front of your original program call and turn:

executablename par1 par2 par3 < inputfile
pgdbg executablename par1 par2 par3 < inputfile

After adding ‘pgdbg’, the redirection of stdin is associated with pgdbg and NOT with the original fortran-executable anymore!" By changing the redirection of stdin into a commandline parameter this problem was solved. The program now runs under pgdbg to the breakpoint and I can step through the execution with the ‘next’ and ‘step’ buttons. For which I would like to have key-strokes either…

So far the progress!



The sequel: to proceed to the next statement, press “ctrl-n”, to step into a routine, press “ctrl-s”. This was an RTFM. Sorry for the inconvenience!


This kind of feedback is always useful - when an experienced user has trouble getting started with one of our tools, we need to take notice of that. Be assured that we have done so. Glad that you are making progress, and sorry for the startup troubles.
–Don [PGI]

Hi Don,

Good that you take my feedback the constructive way! I write my code in the NEdit text editor ( This editor can be integrated as editor component in an IDE. You could provide it as an option for pgdbg. It would be great if I would have only one window/tab for each source-file. Now my source files are shown both in the pgdbg gui and in NEdit, which makes a mess of my desktop. Integration would reduce your work, since NEdit has already been written. It has all the tools and tricks you need: syntax highlighting, backlighting of lines, an enormous macro-language etc. Adoption for PGF95 of the FreePascal IDE, which as far as I know is just a GUI calling an external debugger, would reduce your work even more. By keeping the same key-strokes for shortcuts you would immediatelly gain credit from all Pascal users!

Can you please tell me how I can follow the value of an element of an array (or user-defined type)? I would hope that right-clicking in the source code on the location where a variable is used, would open up a dialog proposing to show the value of this variable (or one of its elements) in a separate “watch” window, along with th eother variables I am watching. And again: having a short-key as alternative would even be better.

I have the impression that much of todays programing tools (in general, not just yours) are developed for huge, graphically supported applications. I still write applications that are called from a commandline with some parameters and that just run for some time to provide a bunch of outputfiles and diagnostics. This “classic” type of application can be very well developed with the FreePascal-type of IDE.

You would be the first company to deliver a good IDE for FORTRAN!

You have my support!