Write and run
Simulate and debug
Simulate runs the same AL and rolls every database change back, so you see the result first. The debugger steps through a simulated run with breakpoints.
updated: applies-to: 1.0.0.0
Use Simulate before any program that changes data.
Simulate
Choose Simulate (Shift+F5). The program runs exactly as it would, then every database change is rolled back. The console shows what happened, and the status says the changes were rolled back.
In the example, the program renames customer 10000 and shows a message. After Simulate, the customer still has its old name. The Changes tab lists the records the run would have inserted, modified and deleted per table.
Debug
- Click in the margin to set breakpoints.
- Choose Debug. The debugger records a simulated run, so changes are rolled back here too.
- Step over, into, out of and back through the statements, and watch the variables.
What is checked
Simulate and Run both go through the Security Guard of Bitta Apps Studio. Writes to protected tables need GodMode and a prompt, and restricted objects such as posting routines need GodMode. See protected tables.
Every run and simulation is written to the Studio Audit Log with its source.
TIP
Simulate on real data, then run. You see the effect on the records you care about without keeping anything.