Skip to content

Environment Variables ​

Diagnostic switches are off when unset.

Debugging and Diagnostics ​

VariableValueEffect
GODOT4Full path to the .NET-enabled Godot executableThe generated VS Code C# launch configuration uses it. On Windows, select the main mono executable, not the _console.exe wrapper. 2dog doctor checks it
TWODOG_LIFECYCLE_LOGLog file pathTraces window activation, minimize/restore messages, Godot window signals and an independent engine-loop heartbeat. Applies to windowed engines using the Windows display driver
TWODOG_GODOT_LOG_DIRDirectory pathMakes 2dog's xUnit/NUnit fixtures enable Godot's verbose native log and write a separate godot-<process-id>-<fixture-number>.log per fixture. Creates the directory if needed; works with headless and windowed fixtures
TWODOG_AVALONIA_DIAGExactly 1Prints Avalonia GPU presentation and Linux EGL interop diagnostics to the console, prefixed with 2DOG_GPU: or 2DOG_EGL:

GODOT4 selects the executable launched by the debugger. Resource import and pack export use the packaged editor by default. To use an external editor, set the GodotEditor MSBuild property explicitly. GODOT4 and GODOT_EDITOR in the environment do not select the editor for import and export.

The lifecycle log appends and flushes once per second, even while the engine thread is stalled. Give each process its own log file. On Windows, Avalonia diagnostics need OutputType=Exe.

bash
TWODOG_LIFECYCLE_LOG=./window-lifecycle.log dotnet run --project MyGame.2dog
TWODOG_GODOT_LOG_DIR=./godot-logs dotnet test MyGame.xunit

CLI Output and Automation ​

These variables affect the 2dog CLI.

VariableValueEffect
TWODOG_ACCESSIBLE1Uses numbered yes/no questions instead of selection lists, and static progress instead of spinners. Equivalent to --accessible
NO_COLORAny nonempty value, including 0Disables colors. Equivalent to --no-color
CLICOLOR_FORCE, FORCE_COLOR1Enables colors even when output is redirected; NO_COLOR, --no-color and plain mode still disable colors
TERMdumbEnables plain output without ANSI sequences and uses accessible prompts. Equivalent to --plain
CI1Disables interactive prompts and animated progress

The CLI also detects GITHUB_ACTIONS, TF_BUILD, GITLAB_CI, TEAMCITY_VERSION, BUILD_NUMBER, JENKINS_URL, BUILDKITE, CIRCLECI, TRAVIS and APPVEYOR as CI indicators. For these indicators and for TWODOG_ACCESSIBLE, CLICOLOR_FORCE and FORCE_COLOR, any value enables the switch, except an empty value, 0 or false. Case does not matter for false.

Godot Assembly Paths ​

GODOTSHARP_DIR (the directory holding GodotPlugins.dll), GODOT_TOOLS_DIR and GODOT_PROJECT_ASSEMBLY_DIR locate Godot's managed assemblies. 2dog sets them for its hosts, so leave them unset. For a game assembly in a custom location, use Engine.ProjectAssemblyDir. 2dog doctor reports stray values as env.overrides.

.NET and Android Tooling ​

VariableValueEffect
DOTNET_HOST_PATH, DOTNET_ROOT, PATHSee .NET environment variablesWhere the CLI finds dotnet for child commands, in that order
AndroidSdkDirectoryAndroid SDK directoryFirst explicit SDK location checked by 2dog new, add and doctor
ANDROID_HOME, ANDROID_SDK_ROOTAndroid SDK directoryAdditional SDK locations checked in that order; see Android environment variables
ANDROID_USER_HOMEAndroid user configuration directoryLocation of debug.keystore for the signing fallback; defaults to ~/.android

For Android signing, set all three variables of a row together:

Build variantKeystore pathKey aliasKeystore/key password
DebugGODOT_ANDROID_KEYSTORE_DEBUG_PATHGODOT_ANDROID_KEYSTORE_DEBUG_USERGODOT_ANDROID_KEYSTORE_DEBUG_PASSWORD
ReleaseGODOT_ANDROID_KEYSTORE_RELEASE_PATHGODOT_ANDROID_KEYSTORE_RELEASE_USERGODOT_ANDROID_KEYSTORE_RELEASE_PASSWORD

2dog passes the password to the signer through an env: reference. See Android signing for the keystore order.

2dog is Free and Libre Open Source under the MIT License.
2dog is not affiliated with or endorsed by the Godot Foundation.
Godot is licensed under the MIT License; the Godot logo is by Andrea Calabró under CC BY 4.0. @icons made by Voxy under the MIT License.
Continuous Integration compute graciously supported by Blacksmith.