Skip to reading
Debugging and Performance Profiling

Stop before a calculation

Edition 0.86.4.7

0.86.4.7 tutorial edition with new lessons for Studio 0.86.4.6 and 0.86.4.7. Earlier chapters, screenshots and registry figures retain their stated edition context.

Download PDFView illustrations

SOURCE DEBUGGING / DESKTOP

Lua paused on the multiplication line inside PCA. The source gutter uses the project’s line numbers.

1. Open Clock-and-Debugging.pca3d. In Output & Diagnostics → Debug & Profile → Line debugger choose Lua and gear_lua. Leave the function as run, arguments as [] and Play game unchecked.

2. Click the gutter beside line 4, then choose Start. Find teeth = 12 in the lower output. Choose Over and inspect total = 60 at the following statement. Continue finishes the call and prints its return.

3. Repeat in GDScript with gear_native at line 3, and BASIC with gear_basic at line 4. Into steps to the next executed line, Over steps at the current depth, and Out resumes until execution returns to a shallower call.

Debug a real interaction#

Enable Play game before Start to launch the game and trigger the action yourself. Stop closes that debug game. Desktop Studio uses a separate local Godot 4.7.2 process. In a packaged editor, choose the Godot executable in Build Tools. On mobile, select BASIC and leave Play game off to debug a function inside PCA.

Page 14 of 19Permalink
Go to page