Visual Debugger Documentation
User manual for version 1.0.0. Also included in the package as Documentation.pdf. Back to the product page.
Contents
1. What Visual Debugger does
Visual Debugger puts your debug output where you are already looking: on the screen and in the game world. It has two systems, and both are used the same way, with one line of code:
- On-screen messages.
DebugScreen.Logprints a colored message to a list in the corner of the screen. The message disappears on its own after the number of seconds you choose. - World-space shapes.
DebugDrawdraws spheres, cubes, arrows, and text labels at any position in the world, in any color, for however long you choose. Shapes draw on top of everything, so walls never hide them.
There is nothing to set up in your scene. The first call creates everything the systems need, and they keep working when a new scene loads.
1.1 Requirements
Unity 6000.3 or newer. No other packages are required.
1.2 What is in the package
The package installs into Assets/Zest Studios/VisualDebugger. It contains the compiled tool (Runtime and Editor), a demo scene in the Demo folder, and the manual.
1.3 Coming from Unreal?
Every Unreal debug helper you are used to has a direct equivalent:
| Unreal | Visual Debugger |
|---|---|
GEngine->AddOnScreenDebugMessage | DebugScreen.Log |
DrawDebugSphere / DrawDebugBox | DebugDraw.Sphere / DebugDraw.Cube |
DrawDebugString | DebugDraw.Text |
DrawDebugDirectionalArrow | DebugDraw.Arrow |
2. Installation
- Import the package from the Asset Store (Window > Package Manager > My Assets).
- Wait for Unity to finish importing and compiling. That is the whole installation; there is no setup window and nothing to configure.
Assets/Zest Studios/VisualDebugger, and its menu is Tools > Visual Debugger.3. Your first debug message
- Open any script that runs in your scene (or create a new MonoBehaviour and add it to any GameObject).
- Add the using line at the top of the file, and a log call in
Start:
void Start()
{
DebugScreen.Log("Hello from Visual Debugger!", 3f, Color.green);
DebugDraw.Sphere(transform.position, 3f, 1f, Color.red);
}
- Press Play. A green message appears on the screen, and a red wireframe sphere appears at the object's position. Both disappear after three seconds.
4. On-screen messages
One method does everything:
string label, // the text to show
float time, // how many seconds it stays on screen
Color color); // the text color
Messages stack in a list on the screen with the newest at the top, and each message fades out when its time runs out.
DebugScreen.Log("Checkpoint reached", 2f, Color.yellow);
// A live stat: log it every frame with a short time
DebugScreen.Log($"Speed: {speed:0.0}", 0.1f, Color.cyan);
5. World-space shapes
All shapes share one parameter order: position, (direction or rotation,) duration, size, color. Note that duration comes before size.
DebugDraw.Cube (Vector3 position, float duration = 5f, float size = 1f, Color color = default);
DebugDraw.Cube (Vector3 position, Vector3 rotation, float duration = 5f, float size = 1f, Color color = default);
DebugDraw.Text (Vector3 position, string label, float duration = 5f, float size = 1f, Color color = default);
DebugDraw.Arrow (Vector3 position, Vector3 direction, float duration = 5f, float size = 1f, Color color = default);
Details worth knowing:
- The second
Cubeoverload takes Euler angles for oriented boxes. Arrowtakes a direction vector; the arrow points along it, andsizeis its length.- Shapes draw with an always-on-top material, so they stay visible through geometry.
- Shapes are pooled. Calling draw methods every frame is fine.
DebugDraw.Arrow(muzzle.position, muzzle.forward, 2f, 1.5f, Color.yellow);
// A label above an enemy for 1 second
DebugDraw.Text(enemy.position + Vector3.up, "HP 3/3", 1f, 1f, Color.white);
6. Choosing where debug output appears
You control where debug output shows up, without touching your code. Open Tools > Visual Debugger > Debug Settings. Shape debugging and screen debugging each have their own mode:
| Mode | Behaviour |
|---|---|
| Off | Calls are ignored everywhere. |
| Editor Only (default) | Draws in the editor, ignored in every build. |
| Editor + Development Builds | Also draws in builds made with Development Build enabled. Use this for on-device debugging. |
| All Builds | Draws everywhere, including release builds. |
The setting is stored in Resources/VisualDebuggingSettings.asset inside the package, so your builds read the same value as the editor. When a system is off, calls return immediately and no debug objects are ever created, so leftover calls cost almost nothing.
7. Trying it without writing code
Two helper components let you fire test output from the Inspector:
- Add the DebugScreenTester or DebugWorldTester component to any GameObject.
- Press Play.
- Use the buttons in the component's Inspector to fire random test messages and shapes.
The Demo folder also contains a small sample scene showing both systems in a playable setting.
8. Updating the package
An update replaces the package folder (Assets/Zest Studios/VisualDebugger). Your own scripts are never touched by an update.
9. Troubleshooting
| Problem | Fix |
|---|---|
| Nothing draws in my build | The default mode is Editor Only. Open Tools > Visual Debugger > Debug Settings and choose Editor + Development Builds (and make sure Development Build is ticked in Build Settings), or All Builds. |
| A shape is invisible | If you passed a color, check its alpha: an alpha of 0 draws fully transparent. An omitted color draws white. Also remember the parameter order: duration comes before size. |
| My message vanishes instantly | The second parameter of DebugScreen.Log is the time in seconds. A very small value (for example 0.1f) is right for per-frame stats, but a one-off message needs a second or more. |
| A shape lasts longer or is bigger than expected | The parameter order is duration first, then size. Sphere(pos, 5f, 1f) is five seconds at size one, not the other way round. |
| Output still shows in a release build | One of the modes is set to All Builds. Open Tools > Visual Debugger > Debug Settings and lower both modes. |
10. Support
Discord: discord.gg/2ths8Hj9QE (the fastest way to reach us)
Email: studioszest@gmail.com
If anything in this manual is unclear, that is a bug in the manual. Tell us and we will fix it.