Cours Lua Run, Step and Quit (Control Pane), tutoriel & guide de travaux pratiques en pdf.
Refresh
Refresh is a special operation, and really shouldnt be used too often, especially with large programs or Lua States. Refresh rebuilds the treeview of all globals, and also updates their entered values. This is only to update changes that a user would possibly create while executing some commands from the Command Line. An example is the creation of new variables, or the modification of tables.
Run, Step and Quit (Control Pane)
Control of the debugger is managed from the Control Pane. Once invoked, the Debugger can Pause execution, continue execution and step execution. To exit the debugger select the Quit button.
For applications that are embedding the Lua Debugger, some controls may not be available. Run and Pause can only operate if the approriate functions are exported to the Debugger.
During the use of a LuaEng application, the Pause will halt the cycle of calling the Main Game State loop, before the initial PreDraw function is called. Because the execution process is held in a loop, there will be no graphical updates done on the LuaEng window – this may change in future releases.
Once a Lua application is Paused, the Step button will issue a single LuaEng loop step. This allows very finite, frame by frame assessment of the Lua State. Watch values will update only for the entire stepped frame.
Pressing Run will resume normal execution. And pressing Step while in Run, will drop the application into Pause mode.
Watch Pane
The Watch Pane is used to examine variables during runtime with the capability to select how often the values are updated in the watch pane.
Too add a variable to the watch pane, select it in the treeview (making sure you select the correct level) and then select right click on the mouse, which will display two options “Add Watch” or “Add break”. Select “Add Watch” and the variable will appear in the watch pane.
Currently the time interval features for the watch updates is not working – but soon to be implemented.
See ‘Future’ for more information on the implementation of this feature.
Command Line
Once a debugger is invoked, a user may execute any Lua command they wish. Clicking in the Command Line and issuing Lua commands will result in error returns (displayed in red after a command is executed) or an Ok return (Ok in blue after a successful command). Using the LuaEng system, all stdout and stderr streams are sent to the log files, so the Lua Debugger does not intercept these. If you are using print commands for example, the output will be sent to the log files.
The Command Line is keyboard sensitive. Everytime a ‘enter’ is entered while the Command Line window has focus, a command will be attempted to be executed. The line previous to the ‘enter’ will be used as the command string.
WARNING: I have found one very serious problem with the Command Line at this time of writing. You cannot set watch variables to nil, while they are in the watch pane. To solve this problem, simply quit from the debugger and reopen the debugger, which will empty the Watch pane. Then you can set any variable to nil safely, and refresh the treeview.
Lua State info General Lua State information will be displayed in the Control Pane. This feature is not yet implemented – see Future for further notes.
Lua Debugger Manual
Contents
Overview
What is it
Why use it
Do I have to use it with LuaEng?
Usage
Invoke debugger
Run, Step and Quit (Control Pane)
Watch Pane
Command Line
Lua State info
Future
Stepping
Watch
Lua State info
Refreshing and Live updates