Skip to reading
New Features Workbook: 35 Hands-on Lessons

Pause a BASIC function on a line

Edition 0.86.4.7

37-page workbook using example workbenches included with the Studio release. The separately attached PDF is byte-identical to this ZIP copy and is included once.

Download PDFView illustrations

Debug, measure and deliver

STUDIO 0.86.4.6 • LESSON 29 OF 35

Follow the shipped BASIC example to see the inputs before the function returns 60.

1. Start the example from Studio

Open examples/workbenches/Clock-and-Debugging.pca3d. In Output & Diagnostics, choose Debug & Profile → Line debugger. Select BASIC, then gear_basic. Set the function to run and enter [] for arguments. Leave Play game clear for this first run.

2. Set a breakpoint and inspect the frame

Click the gutter beside executable line 4, then click Start. When the line is highlighted, check which script and line appear in the paused frame. Select the BASIC record. On mobile, or without an external desktop executable, leave Play game clear. The embedded BASIC function debugger can then pause on a line inside Studio.

3. Finish and repeat

Click Continue to finish. For a desktop game-triggered check, use Play game before Start and trigger the action from the running game. Lua and GDScript line debugging require a desktop Godot 4.7.2 executable available to Studio. In a packaged editor, set it under Build Tools.

A real Lua pause in the workbench. The source gutter and step controls occupy the same places for the other languages.

WHAT TO CHECK

Run the matching example in Regression tests and verify that the expected return is 60. If a breakpoint never fires, check that you selected the exact language, script ID and entry function and that the line has executable code.

Page 31 of 37Permalink
Go to page