Smallworld 5 Debugging Tips

Traceback Information

The Smallworld 5 tracebacks do not provide arguments as in the older versions. They do provide line numbers to the magik or java file that they are called from. This is very helpful only if you have the code, which is less and less under the new product delivery.

Also in Smallworld 5, the actual exemplar/mixin name that the method is written on is reported in the traceback. Prior releases had the subclassed exemplar name if it was inherited. So now it is more difficult to determine from the traceback if you are dealing with a Magik object or a realized database object. It does provide the benefit of knowing exactly where the method is from, where prior releases you had to figure out if the method was written on the exemplar or not.

Reporting Arguments for Methods

I have added code here that easily copies the original method to a new method name. It provides an option to report a replacement method that calls and returns results of the new method name. It will also show the argument list.

To show the arguments being passed into a method you can use the following. This is especially helpful when figuring where unset is being passed to something!


You will be able to compile the reported new method and when called, see what the arguments are.

Java/Smallworld Debug Information (Logs)

You can modify the logging properties file located at core\libs\osgi_config\services\ to enable debug level logging and send through the complete log.


Development Tools

In 4.x GE introduced the Development Tools product & application. It contain a simple 1 method debugger and other tools for coverage & mouse clicks. Out of th box, the development tools were listed as a product in the module manager GUI. In Smallworld 5.1.x (not sure exact release) the product isn't available in the module manager GUI. The product exists under sw_core/modules directory. You can reinitialize the sw_core product or add it using

    smallworld_product.product_path, "sw_core", "modules", "sw_dev_tools"))


Databus Monitoring

The Object Inspector in SW5 (5.1,5.1.2rc1) is flakey. If you just need the databus monitoring piece, you can user the databus_monitor_dialog. For example:{
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License