Skip to content

Play and debug

Play, Stop and the Game screen

Play runs your game in the Game screen, attached to the editor’s debugger as Godot’s own runner attaches it: F5 plays the main scene, F6 the open scene, F7 breaks and F8 stops. Prints go to Output, a script error stops at its line, and breakpoints stop the game.

Leer en español

Keys

KeyWhat it does
F5Play the main scene. A project with no main scene gets Godot’s own question, "No main scene has ever been defined.", with Godot’s Select (any scene) and Select Current (the open scene); the one you pick is set as the main scene and plays.
F6Run the open scene. A scene never saved runs the main scene instead, and a toast says so.
F7Break the attached game in the Debugger, or continue it when it is stopped.
F8Stop the game.
F9 / F10Suspend the game, and Next Frame while it is suspended, on the Game screen’s bar.

One game runs at a time. While another runs, Play says "Another game is running. Stop it before starting this one."

The debugger

Every Play attaches the game to the editor’s debugger, in every view. Prints show in Output, errors and their stack traces under Debugger › Errors, and the running scene tree under Remote in the Scene dock. A script error stops the game at its line, and a breakpoint you set in the Script editor stops it there.

Play brings Output, the Debugger or nothing forward, as Editor Settings › Run › Bottom Panel › Action on Play says.

The Debug menu’s Visible Collision Shapes, Visible Paths, Visible Navigation, Visible Avoidance and Redraw Regions apply to the run, and so do Project Settings › Editor › Run › Main Run Args: the part after -- or ++ reaches your game as user arguments. A run Flockbay’s AI starts runs the game as it is, without them.

The Game screen

The game plays in the Game screen, one tab beside the 2D, 3D and Script screens. In Standard and Full its bar carries Godot’s Game view controls while the game is attached: Suspend (F9) and Next Frame (F10); Input, 2D and 3D, which choose whether a click goes to the game or selects nodes and moves the camera; and Override the in-game camera, with Reset 2D Camera and Reset 3D Camera under Camera Override Options. Every run starts running, on game input and its own camera.

The bar also has Capture, which freezes the game and opens the frame in the chat so you can ring a spot or click a node and add it to your message; Input Map, the game’s input actions and their bindings; and a second instance of the game, as Player 2, for a multiplayer test.

Tune

Tune edits the running game’s exported properties while it runs, named as the Inspector names them, for this scene or all of them. A change reaches every instance at once. Save writes the changed properties to the game’s scenes and resources, Discard reverts the game to the values in its files, and Reset all reverts every property to its value when the run started. Properties you have not saved are applied again on the next Play.

A scene whose speeds, timings and sizes are hard-coded shows "No exported properties in this scene", with Ask Flockbay to expose them, which moves them into typed @export variables without changing how the game plays.

When Play does not start

If Play is greyed out, its tooltip says why: "Locate the project folder before playing." for a moved project, and "Another game is running. Stop it before starting this one."

A game that fails before its window opens says how, in Godot’s terms: Godot’s first error line, with its res:// file and line, then the signal, the exit code or the check that failed. Godot’s output is printed in Output under the reason. The card has Copy details.

A project made elsewhere is scanned before its first Play. If the scan finds something that would stop the game, such as a missing autoload script, the card says "The compatibility scan found:" and lists each finding with the file it names and Open, and offers Play anyway, which runs the game as it stands and lets Godot say what it cannot run. A project from another Godot version asks which Godot to run it on instead: Godot versions and engines.

After a turn

Settings › Chat has two switches, both on by default. Run the game after each turn plays the game when a turn changed it. Fix problems found after a turn automatically sends a turn to fix a project a turn left unable to open, on the chat’s AI. Off, both are yours to press.

A headless run in the chat: Ran rooftops.tscn headless, Godot’s Output with a SCRIPT ERROR line and its at: res://ui/run_timer.gd:31, and exit 1.