Setup

In order to debug Metview, you must first ensure that it has been built with debugging enabled:

Starting the debugger in the correct environment

When debugging a Metview module, the debugger must be started from the correct environment.

    1. Create a new Shell Script icon (from the New Icon desktop menu)
    2. Edit the icon and type 'xterm' (without the quotes) in it, and save
    3. Right-click | execute the Shell icon

Debugging a module

From a terminal which has the correct environment as described above, you can go to Metview's executable directory:

cd $METVIEW_BIN

Now, you can either just start up your chosen module in this xterm to see more output messages from it, or else you can start the debugger with it. Generally, the command-line arguments -nofork and -debug should be supplied. In the case of the Macro module, -serve should also be supplied. Example with totalview:

tv8 ./ObsFilter -a -nofork -debug


If the module does not start, then it might be because it is already running - from a Metview desktop, choose Process Monitor from the Tools menu and stop the process. If debugging the Display Window, then the corresponding executable is called uPlot; running this will create an empty Display Window into which you can drop icons. Note that you may have to kill the existing instance of the module if it has already been run during this Metview session - use Metview's Process Monitor for this.

Example - getting more output from the Observation Filter:

 ./ObsFilter -nofork -debug

Now run your Observation Filter task and look at the output in the xterm.