Skip to reading
Debugging and Performance Profiling

Test the gate with 1, 2 and 3 tickets

Edition 0.86.4.5

New 0.86.4.5 field guide. Complements the existing Error Handling & Debugging manual. Benchmark and regression figures are worked examples from the guide, not general performance guarantees. Native GDScript line debugging and engine-level profiling use Godot tools.

Download PDFView illustrations
On this page

WORKED CASE / TICKET GATE

The workbench phone runs the visual script gate_route on each completed digit. Its rule is “at least two tickets.” Success sets paid to 1. The graph leaves tickets unchanged.

Read the two exits#

True goes to the orange Set Variable node. False goes to End. Neither route removes an inventory item.

The shipped Ticket gate visual script. The output labels on the left node identify each branch.

Start a Trace with the workbench open. In State, type global.tickets in the 1 watch field, enter 1 in New JSON scalar, and choose Set watched global. Repeat with global.paid and 0.

Return focus to the preview phone and complete one digit. In State, evaluate 2 global.paid, then global.tickets. Repeat the whole test with 2 and 3 tickets. Reset paid to 0 before each attempt.

Source table from Test the gate with 1, 2 and 3 tickets, page 3
Starting ticketsExpected successorPaid afterwardTickets afterward
1no → End01
2pay → Set Variable12
3pay → Set Variable13

Why all three tests matter#

A rule using > instead of >= rejects exactly two. A rule using == accepts two but rejects three. A stale paid flag from the previous trial can hide either bug.

Page 3 of 13Permalink
Go to page