Getting Started

Debugging & testing with the agent

New to Emergent? The Learn the Basics path walks this end-to-end.

Overview

Newer to this? Start with Try it before you share it and When something breaks; this page covers the deeper testing layer.

When your app doesn't behave as expected, Emergent's agent can diagnose and fix issues directly in the chat. This guide shows you how to surface errors, provide context, and use the platform's built-in testing tools to ship a polished app.

Note

The agent works best when given complete error messages and clear reproduction steps. The more detail you provide, the faster it can iterate toward a fix.

Debugging with the agent

1

Paste the full error message

When your app throws an error, copy the entire error text from the console, logs, or error modal - including stack traces, file paths, and line numbers. Paste it directly into the chat with a short prompt:

please solve this error

[full error text here]

The agent will parse the stack trace, identify the failing component or API call, and propose a fix.

Tip

If the error occurs in the browser console, right-click the message and select "Copy" to capture the full output, including stack frames.

2

Upload a screenshot for UI bugs

Visual issues - misaligned components, missing styles, incorrect colors - are often faster to diagnose from a screenshot. Upload an image (drag-and-drop or click the attachment icon) and add a brief description:

This modal is cut off on mobile (screenshot attached). The submit button is hidden below the fold.

The agent will inspect the component's layout constraints and suggest CSS or flex adjustments.

3

Provide context for stubborn bugs

If a bug is intermittent or hard to reproduce, describe the conditions:

  • When does it happen? (e.g., "only after logging in," "on the second page load")
  • Where does it occur? (specific page, route, or user flow)
  • What user action triggers it? (button click, form submission, navigation)

Example:

The "Add to Cart" button doesn't respond when I click it after navigating from the product list. It works fine if I reload the product detail page directly.

This helps the agent narrow down state-management issues, routing bugs, or missing event handlers.

4

Read automated test results

The agent has testing capabilities and can run tests covering routes, API endpoints, and key user flows. If you request testing or the agent surfaces test output, it will:

  1. Show which test failed and why
  2. Automatically attempt a fix
  3. Re-run the tests to confirm the issue is resolved

You can also request specific tests:

test the checkout flow end-to-end

Info

Automated tests catch regressions early - especially useful when you're iterating quickly on features. Review the test output to understand what the agent validated.

5

Request internal test builds for mobile apps

Before publishing to the App Store or Play Store, generate an internal test build to validate the experience on real devices. In the chat, ask:

create an iOS test build

or

create an Android test build

The agent will produce a signed build (TestFlight for iOS; APK/AAB direct install for Android, note that native builds require a paid Emergent plan) and provide installation instructions. Share the build link with testers to gather feedback before your public launch.

Tip

Internal builds let you test on actual hardware, verify push notifications, and confirm in-app purchases - scenarios that are difficult to simulate in the workspace preview.

See Publishing to the stores for details on moving from test builds to production releases.

When to escalate

Most bugs can be resolved in chat with clear error messages and context. If an issue persists after several iterations:

Warning

If your app handles sensitive data, review Your data & ownership to understand how logs and error traces are stored during debugging sessions.

Was this page helpful?

Related pages