Debugging

To debug the extension scripts:

  1. After the last step of the previous paragraph the Activity Explorer can contain already some components. This is the case when the activity is also used in the Extension Modeler. If the extension script to debug is not in the Activity Explorer, you must retrieve it from the LN server. To retrieve an extension script, expand the tx package in the Component Explorer and expand Libraries. Choose the module which holds the extension script for your extension point and expand it. Select the extension script, right-click it and click Get.
    Alternative: Click Select a Software Component (Alt+Q), specify txes in Component Code and click Search Components (Ctrl+Space). Select the extension script to debug and click OK. A message whether to open the editor for the new software component is displayed. Click Yes.
  2. Click Source at the bottom of the component editor.
  3. Set a breakpoint or watchpoint in the source.
  4. Switch to LN UI.
  5. Select Debug and Profile 4GL in the Options menu.
  6. Check the Debug Mode option.
  7. Select LN Studio as the Debug UI.
  8. Application Name and Activity Name must show the Application and Activity, that you current have in LN Studio. If Application and/or Activity are not filled with the current Activity, change the fields.
  9. Click OK.
  10. Start a session that executes the extension script:
    1. For a table extension, this can be a session that uses this table as a main table. But it can also be a session for another table, which does a dependent update in your table. For example, if you have a table extension for the inventory allocations table, you can start the sales order lines session to debug your extension.
    2. For a report extension, you must start the print session that produces the report.
    3. For a session extension, you must start the session you have extended. Note that it can be required to start with another session if your session cannot be started directly from the menu.
    4. For a BOD extension, you must start a session that publishes the BOD. This can be a session in the normal process flow, but you can also use the session that simulates the publishing of your BOD. Those sessions can be found in the Common menu under BOD Messaging > Publish BODs.
  11. Use the available options of the debug Perspective in LN Studio to debug your extensions.