Table of Contents
The first time you try Gubed it is a good idea to try it with the included test scripts, to get a feel for what Gubed is capable of and how it works.
The Gubed testbench has a few different simple scripts to try out Gubed with.
Start by launching the Gubed client, you will be presented with an empty screen like shown below.
In the top you see a menubar and a toolbar, for a full explanation of all the actions available here see the client reference section. Below the toolbar is a treeview to the left, the source view to the right and the log output at the bottom.
In the toolbar, there are three buttons that resembles the buttons of an audio player. In gubed, these buttons are called trace, run and pause. When a script is running, you use these buttons to control the execution of the script. Trace, makes the script go slowly through the code showing you every line it executes and constantly updates watched variables. Run, executes the script faster and halts only on breakpoints and errors. Pause halts the script, so you can gain control for example if it has entered an eternal loop.
Since no script is currently running, the buttons will control what state the debugger should start the next script in. If pause is not already activated (you cant press it), press it. This means the next script you debug will start in paused mode.
Next, open up a browser. Enter the url of the Gubed directory on the server and click on the testbench link. in the menu to the left, you can chose between different tests. Start the first test by clicking the "Launch the breakpoints test with Gubed activated" link.
Once you do this, the Gubed client should start working. If it doesent, and you get an error in the browser that the script couldn't connect to the client, make sure you configured it right (see the server installation section of this manual).
As you can see, the source of the script appeared to the right and the first line has a little arrow to the left of it.
Now you can click the
button in the toolbar to single step your way through the code, or click to make it execute the script.You can also click in to the right of the linenumbers in the source view to set bookmarks and breakpoints in the code.
If you wish to kill the script premature, there is the
button for that.Since you now have Gubed up and running, you can either try the different test scripts more or go on to debug your own scripts.