- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, this forum has been a great help for me to get started with XCode and Fortran.
Everything is up, compiling and running fine.
Now, there is a debugger included, and I think I need some pointers regarding that debugger.
Is that an Intel debugger that comes with ifort?
I'm asking because I am looking for documents/html sites... that describe debugging with ifort in XCode...
One problem I'm having is what has previously been called watch variables. I want to see how a variable changes as the debugger moves step by step through the program... I've found under Run--Variables View--Watch Variables...
But those seem to be a pre-defined set of variables, and it seems I'm not able to add one...
Thanks for your help,
Claus
Everything is up, compiling and running fine.
Now, there is a debugger included, and I think I need some pointers regarding that debugger.
Is that an Intel debugger that comes with ifort?
I'm asking because I am looking for documents/html sites... that describe debugging with ifort in XCode...
One problem I'm having is what has previously been called watch variables. I want to see how a variable changes as the debugger moves step by step through the program... I've found under Run--Variables View--Watch Variables...
But those seem to be a pre-defined set of variables, and it seems I'm not able to add one...
Thanks for your help,
Claus
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are glad to hear the forum is helping. Hopefully having the interactions captured will help others in the future too.
About debuggers: Now it gets interesting.....
There are limitations to debugging Fortran programs under the Xcode debugger, which uses gdb as the underlying debugger. The biggest limitation is there is no support of Fortran MODULEs. This debugger works well for simple structured Fortran programs. Xcode support of Fortran is provided exclusively by Apple.
The Intel Debugger (idb) included in the Fortran Mac OS package isa command-line based debugger that fully supports debugging Fortran and C/C++. There are a few previous forum posts about using DDD with idb (search for DDD; one post is here) to gain some GUI-based functionality. It is not the perfect solution, but can offer support of Fortran MODULEs with some GUI-based controls.
As for watching variables, Xcode is capable of watching a program's variables under the debugger view. To raise this view select Run > Debugger. That only raises the Debugger window and does not start execution.
The debugger window contains three views. The top left is the Thread view. The top right is the Variable view (with locals, globals, arguments, registers, etc.). The bottom is the Source view.
The variable view provides the ability to watch a program's variables when stepping execution. If you have a breakpoint already set in your program, then start execution using Run > Go (Debug). You should see the variable window update and list variables local to the routine where execution stopped. You can explore the other variables in this view too.
The access to all the program's variables depends on the same factors faced with debugging on Windows. Debug vs. Release builds by default offer different access to variables since release builds are optimized and may have some variables optimized away; one may need to enable debug symbols for the Release build; and so on.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page