wiki:FAQ/Debugging

Debugging

  1. Basics about the debug version of muimaster.library

Basics about the debug version of muimaster.library

All of MUI's debugging facilities are controlled by an ENV variable called "muidebug". Just set this variable to the classes you want to get debugging information for. All debugging messages will be sent to the serial port by default and must be captured with a second computer connected via a nullmodem cable. Alternatively you can redirect the output to a console window or a file using a tool like Sashimi.

The contents of the ENV variable "muidebug" are treated as a concatenated string of these words. Each enables a specific set of debugging messages. The single words should be separated by either spaces or commas. All currently available debug flags are:

  • class - all class related stuff
  • object - all object related stuff
  • window - all window related stuff
  • config - all configuration related stuff
  • pop - all pop object related stuff
  • prefs - all preferences related stuff
  • menu - all menu related stuff
  • list - all List.mui related stuff
  • area - all Area.mui related stuff
  • screen - all screen related stuff
  • boopsi - all BOOPSI related stuff
  • color - all color management related stuff
  • image - all image management related stuff
  • layout - all layout related stuff
  • app - all Application.mui related stuff
  • task - all subtask related stuff
  • data - all Dataspace.mui related stuff
  • input - all input event related stuff
  • lib - all library open/close related stuff
  • bubble - all bubble help related stuff
  • mcc - all external custom class related stuff
  • dir - all Dirlist.mui related stuff
  • asl - all ASL requester related stuff
  • layer - all layer related stuff
  • method - all method related stuff
  • misc - misc stuff
  • all - all of the above

To make use of this special debug version, you also need a way to catch the serial output that this debug version sends its debugging information to. This can either be achieved by using a null-modem connection to a second computer (connected to your Amiga via a serial nullmodem cable) or via the Sashimi application available on AmiNet. Sashimi is an application to catch all output sent to the serial line of your computer and as such allows you to catch the debugging information sent by MUI. In case you are not using Sashimi to capture the debug output, it will be send over the serial line to the remote computer and must be logged there with an appropriate terminal program (e.g. HyperTerminal or TeraTerm Pro under Windows or miniterm under Unix).

Using Sashimi:

If you are using Sashimi to log the debugging information locally, please run Sashimi before running any MUI application like this:

run <>nil: sashimi on noprompt >debug.log

Sashimi offers some more options to influence its behaviour. Please refer to Sashimi's documentation for further information.

Other required third-party debug tools:

Depending on the platform you are running MUI on you should have the following tools installed and running before you start running a debug session of MUI:

AmigaOS3:

  • Enforcer or CyberGuard - to catch illegal memory accesses.
  • SegTracker - to enable Enforcer/CyberGuard to show the hunk and source code information of the memory fault.

AmigaOS4:

  • MemGuard - to enable AmigaOS4 to track for memory leaks and such

All these tools are available mostly on AmiNet or from other public places. Please read their documentation carefully. Usually no special options need to be specified to get a usable output in case of a crash. The only important point is to start those tools before running any MUI application.

Examples:

setenv muidebug screen,task

This will output all messages related to MUI's public screen handling along with the task handling involved.

setenv muidebug all

This will enable all debugging messages. Note: the debug output will become very large and verbose!!

Make sure to set ENV:muidebug before starting the first MUI application. Otherwise all debugging output will be disabled. Please note that even without any active debugging output the behaviour of MUI and all of its classes may differ from the non-debug version, as all the debugging stuff is still happening in the background. It is just not sent anywhere!

Last modified 8 months ago Last modified on Jan 3, 2017, 8:42:33 AM