Debugger behaviour

I can clear the Output window with Control-right click on the window, but I’ve yet to find a way to clear any of the others – Variables, Debug, Watch and Evaluate windows.

There are times when I click the green run button it runs right through the script without enabling the step options. And others when it waits for my selection of steps. Some kind of modality switch I’ve not picked up on. What am I missing?

My only previous experience is with a debugger FMP’s admittedly limited debugger. I’d appreciate some guidance in the various options. The User manual provides just a single unreadable screenshot for each of the options, nothing about their utility, their functionality. Clearly inadequate for my level of greenness.

I can clear the Output window with Control-right click on the
window, but I’ve yet to find a way to clear any of the others – Variables,
Debug, Watch and Evaluate windows.

There are times when I click the green run button it runs right through the
script without enabling the step options. And others when it waits for my
selection of steps. Some kind of modality switch I’ve not picked up on.
What am I missing?

My only previous experience is with a debugger FMP’s admittedly limited
debugger. I’d appreciate some guidance in the various options. The User
manual provides just a single unreadable screenshot for each of the
options, nothing about their utility, their functionality. Clearly inadequate
for my level of greenness.

Morley,

Here are some steps to help you to begin using the Debugger for your scripts:

  1. Make sure that you are not in Designer mode –
    you should be in Data (ready) mode.

The Debugger will not run when you are in Designer mode.

  1. Open the Method editor and open the script you would like to debug.

  2. Go to the Debugger section of the Method Editor
    (the bottom right pane of the Method Editor).

  3. Click once on the “Enable Debugger” control above the Debugger pane.

  4. Click once on the down arrow - the “Options” control - to the right of
    the “Enable Debugger” control and choose “Enable entry break”.

  5. Make sure that the “Variables” tab is selected.
    (When you run the Debugger, the variables will automatically
    refresh for the script that is currently active - open).

  6. Click once with your cursor to the left of the first line in your script.

  7. Click once on the right-facing green arrow control - “Run”-
    located just above the Debugger pane.
    (If you hover your mouse cursor over the control, you
    will see the tooltip “Run”.)

  8. This will begin the debug process.

  9. To step through each line of code in your open script, click once on
    the control just to the right of the “Run” control - this control is called
    “Step Into” (which you can also determine by hovering your mouse
    cursor over the control and viewing the tooltip).

  10. As you step through each line of your open script, you can see the
    variables and their values in the Debugger “Variables” tab pane.

  11. Once you become more familiar with using the Debugger, then you
    can set break points to more efficiently debug parts of a script.

All of the above infomation is included in the section called “Debugging
methods” starting on page 339 in the printed version of the Servoy
Developer Edition Volume 1: User’s Guide and the corresponding pdf file.

While it may be true that certain screenshots in this section result in the
Debugger pane being reduced in size in order to show the entire Method
Editor window, you can always go to the Help Navigator in Servoy (F1 or
Help from the Help menu). The content in the Help Navigator is EXACTLY
the same as in the printed and pdf versions and the screenshots are all
displayed at 100% - so that you should have less problem being able to
view the detail in any of the screenshots.


Marc Norman
Servoy

Understood. But there remain unexplained oddities.

  1. Click once on the down arrow - the “Options” control - to the right of the “Enable Debugger” control.

Sorry, but I don’t understand the functionality of the “Enable/Disable Entry Break” option. No obvious difference in behaviour either way.

There are times when the plus button next to “Arguments” in the Variables section can be accessed, and times when it can’t. Have yet to discover any pattern to it. Can you explain?

Besides that, on opening the tree provided (when available) I’m unclear about the information provided. Can you point me in the right direction?

Sorry, but I don’t understand the functionality of the “Enable/Disable Entry Break” option. No obvious difference in behaviour either way.

Morley,

Actually, you have experienced the difference between “Enable entry
break” and “Disable entry break”.

There are times when I click the green run button it runs right through the script without enabling the step options. And others when it waits for my selection of steps. Some kind of modality switch I’ve not picked up on. What am I missing?

When “Enable entry break” is selected (and “Enable Debugger” is
chosen), you can run an open script in Debugger and step through each
line of code. If “Disable entry break” is selected (after choosing “Enable
Debugger”), pressing the “Run” control will execute the script without
allowing you to step into each line of your code.


Marc Norman
Servoy

There are times when the plus button next to “Arguments” in the Variables section can be accessed, and times when it can’t. Have yet to discover any pattern to it. Can you explain?

Besides that, on opening the tree provided (when available) I’m unclear about the information provided. Can you point me in the right direction?