🐞Debugging with AI
Use this process when something in Sandbox Studio behaves differently than expected, throws an error, or stops working after a change. The goal is to give the AI enough evidence to reason about the problem without guessing.
Step 1: Capture the problem
Write one sentence that names the broken behavior.
State what you expected to happen.
State what happened instead.
Name the feature, scene, node, or UI involved.
Example: When I press E near the door, the indicator disappears but the door does not open.
Step 2: Reproduce the issue
Trigger the problem again from a known starting point.
Open the scene or project state where the issue happens.
Perform the exact action that causes the issue.
Confirm whether the same result happens again.
The broken behavior is visible after completing the reproduction steps.
Step 3: Collect the evidence
Open the browser console and save the output as a file. This gives the AI the exact error trace without any transcription errors on your part.
Press F12 to open the browser console. The DevTools panel opens at the bottom or side of the window.
Click the Console tab if it is not already selected. Look for red error messages or yellow warnings.
Right-click anywhere in the console output and choose Save as... to save the log as a file.
Drop the saved file directly into the agent chat window. The AI reads the full log without you needing to copy or summarize anything.
Step 4: Give the AI the context
Send the AI a short debugging brief before asking for a fix.
Describe what you were trying to build.
Describe the current behavior and desired behavior.
Paste the exact error or symptom and list the relevant files, nodes, or UI.
Use this prompt pattern: I was trying to [goal]. I expected [result]. Instead [actual behavior]. Here is the exact error: [error]. The relevant project context is [files or objects].
Step 5: Ask for likely causes
Ask the AI to explain the most likely causes before changing anything.
Request two or three likely causes.
Ask what evidence supports each cause.
Ask which cause should be checked first.
Example prompt: Given this error and context, list the three most likely causes. Do not edit anything yet. Tell me what evidence supports each cause.
Step 6: Apply one fix
Choose the smallest fix that matches the evidence and apply only that fix.
Keep the change limited to the files needed for the chosen fix.
Avoid combining several possible fixes in one pass.
Stop after the focused change is made.
Step 7: Run the same check
Repeat the same reproduction steps you used before the fix.
Start from the same scene or project state.
Perform the same action that caused the issue.
Compare the new result with the original problem.
Step 8: Share the result
Tell the AI what happened after the check.
Say whether the original issue is fixed.
Paste any new error message or behavior.
Ask for the next smallest step if the issue remains.
Example: After this change, the Indicator appears again, but pressing E still does not open the door.
Step 9: Record the fix
Write a short note explaining the symptom, cause, and final change.
Name the original symptom.
Name the cause if it is known.
Name the change that fixed it.
Keep this note with the task, project notes, or pull request so the same problem is easier to recognize later.
What You've Done
You have turned a vague problem into a focused debugging loop: reproduce the issue, collect evidence, ask the AI for likely causes, apply one fix, and verify the result. Use the same process whenever a Sandbox Studio feature behaves differently than expected.
Last updated
Was this helpful?

