Effective debugging in Eden spans several layers: issue reporting with proper logs, host-side debugger configuration, guest-side GDB stubs, graphics debugging with RenderDoc, and structured PR testing. This page covers all of them.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/eden-emulator/mirror/llms.txt
Use this file to discover all available pages before exploring further.
Accessing debug logs
Debug logs are the first thing to include in any bug report.- Desktop: Go to General → Debug → Open Log Location.
- Android: Use the Share Debug Logs option.
Issue reports
When reporting a bug, include backtraces, debug logs, or both depending on the issue type.Graphics bugs
If the issue is graphical (mismatched colors, vertex explosions, flickering, etc.), enable Graphics Debugging before reproducing the problem:- Desktop: General → Debug → Graphics Debugging
- Android: Advanced Settings → Debug
- Windows
- Linux / BSD
- Android
Install the Vulkan SDK. The validation layers are bundled with it.
Debug builds and CCache
When building for debugging, use theDebug CMake build type:
Debugging host code
When debugging Eden itself (not the guest Switch application), signal handling needs adjusting so the debugger does not stop onSIGSEGV, which Eden uses internally.
- gdb
- lldb
Debugging guest code with GDB
To debug the Switch application running inside the emulator, you need a GDB build targeting AArch64.Installing AArch64 GDB
- Arch Linux
- Gentoo
Launching the GDB stub
Run eden-cli with the debug flag, substituting your actual config path and game path:c to continue. If the emulator crashes, run bt (backtrace) and layout asm to inspect the failure.
GDB cheatsheet
Navigation and execution
Navigation and execution
Inspection
Inspection
| Command | Description |
|---|---|
bt | Print backtrace |
p <expr> | Print a variable (p/x for hex) |
display <expr> | Display a variable after every step |
frame <n> | Switch to frame n from backtrace |
info threads | List all active threads |
thread <n> | Switch to thread n |
layout asm | Show disassembly TUI |
Breakpoints
Breakpoints
| Command | Description |
|---|---|
br <expr> | Set breakpoint at expression or address |
delete | Delete all breakpoints |
catch throw | Break at any C++ exception throw (also br __cxa_throw) |
br _mesa_error | Break on Mesa errors (set MESA_DEBUG=1 first) |
Monitor commands
Monitor commands
| Command | Description |
|---|---|
mo help | List available monitor commands |
mo get info | Print emulator info |
mo get fastmem | Print fast-memory mapping info |
mo get mappings | Print memory mappings |
1234), pointer dereferences (*var), and computed expressions (*(1 + var)). For full reference, run info gdb or read the GDB man page.
RenderDoc — graphics debugging checklist
RenderDoc is a free, cross-platform graphics API debugger with Vulkan support. Before using it to chase black screen issues, confirm there are no validation errors — any validation error means behavior is undefined. When debugging a black screen, work through this checklist:Draw calls and geometry
Draw calls and geometry
- Draw call counts are non-zero (and, if rendering many triangles, not just 3).
- Vertex buffers are bound.
- Vertex attributes match the expected size and offset for each attribute.
Pipeline state
Pipeline state
- Viewport:
x=0, y=0,widthandheightmatch screen dimensions,minDepth=0,maxDepth=1, NDC depth range is0, 1. - Fill mode: solid (unless wireframe is intentional).
- Cull mode: back or none, as expected.
- Winding direction: typically counter-clockwise (CCW).
- Scissor region matches the viewport
x, y, width, height.
State and descriptors
State and descriptors
- Push constants and descriptor data contain correct values.
- Model, view, and projection matrices are uploaded correctly.
- Blend state is correct.
- Depth state is enabled with function set to Less than or Equal.
Swapchain
Swapchain
- Swapchain images are bound when rendering to the swapchain.
- The image being rendered to is the same image being presented.
Testing pull requests
When testing a PR, always compare against themaster branch it was based on to distinguish regressions from pre-existing bugs.
Before testing, delete the shader cache and use matching settings on both the PR build and the master build. A leftover shader cache can make a PR look like it introduced a regression when it did not.
What to test
- Test PRs relevant to your platform. If a PR is marked
[linux], test on Linux;[android]means Android;NCEmeans Android and Linux ARM64. - Skip PRs marked
[docs]or trivial cosmetic changes unless you specifically want to test them. - WIP PRs do not need testing unless the author explicitly asks.
Testing checklist
For regressions or bugs from a PR or commit:- Does the issue occur on
master?- If yes, does it occur on the previous stable release?
- If yes, does it occur on older releases? (Some bugs predate Eden.)
- If no, bisect between the previous stable release and the current
masterHEAD.
- If no, the PR likely introduced it — bisect within the PR’s commits.
- If yes, does it occur on the previous stable release?
Bisecting
Git bisect uses binary search to find the commit that introduced a regression:Reporting findings
Always state explicitly whether the behavior was also present onmaster:
Adding boolean settings toggles
To add a permanent boolean setting across both the Qt (desktop) and Kotlin (Android) frontends:Declare the setting in common/settings.h
Category::Renderer, Category::RendererAdvanced, Category::RendererExtensions, Category::System, and Category::Core. Change false to true only if the setting should be on by default.Place it in the right section (Android)
In Order matters — settings appear in the UI in the order they are added.
SettingsFragmentPresenter.kt, add within the correct category block:Debug knobs
Debug knobs provide a lightweight way to gate temporary debug behavior without deploying a full settings toggle. Thedebug_knobs setting is a 16-bit integer (0–65535) used as a bitmask — each of the 16 bits independently enables a debug feature.
This is the preferred approach for features that are only needed during development and will be removed before merging.
Accessing knobs in code
- C++
- Kotlin (Android)
Setting knob values
| Interface | Location |
|---|---|
| Desktop | Debug tab → “Debug knobs” spinbox (0–65535) |
| Android | Debug section → integer setting |
| Config file | Set debug_knobs directly |
| Goal | Value |
|---|---|
| Enable bit 0 only | 1 (2⁰) |
| Enable bit 1 only | 2 (2¹) |
| Enable bits 0 and 1 | 3 (2⁰ + 2¹) |
| Enable bit 15 | 32768 (2¹⁵) |
Terminology
Debug knobs are zero-based. When communicating about them:- Use plural “knobs” when referring to the setting value as a whole:
knobs=3means knob0 and knob1 are enabled. - Use singular “knob” with an index when referring to a specific bit:
knob0,knob1, or “knobs 0 and 2”.
Code examples
Conditional debug logging
Conditional debug logging
Performance path toggle
Performance path toggle
Feature gating
Feature gating
Native application development
When developing homebrew or native Switch applications and testing them under Eden, two debug settings are particularly useful:- Standard key prefix — Redirects the key manager to a file other than
prod.keys. For example, setting this toothermakes Eden look forother.keys. Useful for testing multiple key sets without overwriting your main keys. - Changing serial — Sets a debug serial and battery number. Only the leading digits (excluding the last) are used. Region settings influence the generated serial, which corresponds to a non-OLED/non-Lite console.