Skip to main content

Debug app issues

The debug console, found in the status bar at the bottom of the app builder, enables you to inspect your app, identify issues, and resolve them using the agent. The button displays icons for the number of logs and errors currently present.

Errors

The Errors tab shows function errors, build errors, and frontend errors. Expand each error to see more information.

Hover over each row to see two options:

  • Add to chat adds the context of the error to the agent. You can add additional information to the prompt, and submit.
  • Fix automatically prompts the agent to investigate and resolve the error.
Best practice

Click Fix all at the top of the window to ask the agent to fix all errors in the list.

Logs

The Logs tab shows any log emitted by the app or the agent. Log types include:

  • Function: Any functions the app runs, including their duration and any errors thrown by function code.
  • Build: Compilation events for the app, including type errors, build failures, and recovery.
  • Frontend: Browser console output from the running app, including logged messages and thrown errors.
  • Sandbox: Status of the sandbox environment that runs the app preview, such as when it becomes ready.
  • Agent: Actions the agent takes, such as the tools it calls while building the app.
  • Git: Git operations for the app, such as pushing commits or restoring project files.

All rows include an Add to chat option on hover, which adds the context of the log to the agent. You can add additional information to the prompt, and submit. If the log is an error, a Fix button is also present, which automatically prompts the agent to investigate and resolve the error.

Timeline

The Timeline tab shows a record of all your function runs and the elapsed time and success of each. You can use this tab to diagnose performance issues. Refer to the performance troubleshooting guide for resolution suggestions.