MDT on Facebook MDT on Twitter

Debugging Magik Programs

Debug Perspective

Debug perspective is designed for debugging Magik programs. It includes a Magik editor area and a set of views which present aspects of the program being debugged. In standard configuration, when GIS session is started in debug mode and program is in breakpoint stage, the program execution is suspended and you are asked if you want to open the Debug perspective.

Debugging is possible only for Smallworld 4.1 and higher. Smallworld's Virtual Machine simply does not support debugging in older releases.

Magik Stack Trace Console

A new type of a console has been added to MDT. The Magik Stacktrace Console displays a Magik stacktrace in a nicely formatted manner, with hyperlinks, which lead to the definitions of the stack trace line elements. You can paste stack trace from GIS console and follow created hyperlinks. A stacktrace content can also be edited.

Debug View

Debug View allows you to manage the debugging or running a program in the environment. 

It displays the stack frame for the suspended threads for each target that you are debugging. Each thread in the debugged program appears as a node in the tree. The view displays the process for each target being run. If the thread is suspended, its stack frames are shown as child elements.

Breakpoints View

Breakpoints View lists all the breakpoints that you have currently set in your workspace. Double-click a breakpoint to display its location in the editor (if applicable). You can also enable or disable breakpoints, delete them, add new ones, group them by working set, or set hit counts.

Variables View

Variables View displays information about the variables associated with the stack frame selected in the Debug View. While debugging a Magik program, variables can be selected to give more detailed information displayed in the Detail Panel. In addition, objects can be expanded to show slots that the variable contains.

Displaying logical structures in Debugger

New debugger Logical Structures feature allows to present alternate structures for common types in the debugger views. It is very useful in case of collection objects, you can easily access their contents without having to look into their implementations. Showing logical structures is accessible from different views and dialogs.

By default MDT provides logical views for basic collections. You can define more logical views for other types using Logical Structures preference page.

Expressions View

Data can be inspected in the Expressions View. You can inspect data from a scrapbook page, a stack frame of a suspended thread, and other places. The Expressions View opens automatically when an item is added to the view. Entries in the Expressions View can be selected to have more detailed information displayed in the Detail Panel. When debugging a Magik program, data that contain variables can be expanded to show the variables and the slots the variables contain.