In this section you will learn how to debug a Smallworld 5.1 and later program.
- Start swaf session assigned to ws_example_magik project in debug mode.
- Add Magik product named ws_example_product to session. Select it in Product Explorer view and click Session > Add Product.
- Load Magik module named ws_example_module to session. Select it in Product Explorer view and click Session > Load Module.
- Double-click the ws_manager.magik file to open it in the editor.
- Place your cursor on the vertical ruler along the left edge of the editor, on the following line in ws_manager.send_data() method:
write("[MAGIK] send data to WS:", url);
double-click on the ruler to set a breakpoint.
- Double-click the WsManager.java file from the ws_example_java project to open it in the editor.
- Set breakpoint on the following line:
- Run the program in the console with a command: ws_manager.send_data()
- The program will execute until the first breakpoint is reached (in Magik code). When the breakpoint is triggered, execution will be suspended and
you will be asked, whether to switch to the Debug perspective. Click Yes. Notice that the process is still active
(not terminated) in the Debug view. Other threads might still be running.
- Press F8 or click Resume () button to allow
the program to run until the next breakpoint is encountered or until the program is completed.
- The program will execute until the next breakpoint is reached (in Java code).
- You can end the debugging session by allowing the program to run to completion, or by terminating it. You can find more information about debugging Smallworld 5 program here.
- Next exporting Java library.
Smallworld 5 Debugger
Smallworld 5 Local Debugging
Smallworld 5 Debug Preferences