GUIKit Widget Debugging

You can debug the scripts in your GUIKit widgets with the Wolfram Workbench. This can be a significant help in developing and improving your user interfaces.

Setup and Launching

You have to make sure that your widget definitions are included in your project, as shown in the GUIKit project section.

Next you should launch Mathematica in debugging mode. It is important to launch the debug mode before loading GUIKit.

Setting Breakpoints

Now you should be able to set a breakpoint in one of the scripts of a widget. An example is shown below.


Here the breakpoint is set on the first line of the script where the assignment to the variable value is made.

Launching the GUI

At this point you can execute Mathematica commands to load GUIKit and call your widget. The following shows a possible set of commands.


This should cause your widget to appear. This example code produces an interface that appears as below.


Triggering the Breakpoint

When the slider is moved, this triggers a change event that calls the script and hits the breakpoint. This should produce a Debug view that looks something like the following.