# Debugger

> Pause your app's JavaScript at a breakpoint, step through it, and inspect the call stack and variables. There is nothing to set up.

The Debugger panel lets you set breakpoints in your app’s own source files, step through the code when it pauses, read the call stack and the variables in each frame, and evaluate expressions against a paused frame.

[Setting up Debugger in the SDK](/docs/sdk/debugger/)

![The Debugger panel paused on a breakpoint in a network request handler, with the call stack and local scope open](/_astro/debugger-panel-light.DNEVfRB__ZKshzU.webp)![The Debugger panel paused on a breakpoint in a network request handler, with the call stack and local scope open](/_astro/debugger-panel-dark.CG7D3BDR_1QCGC7.webp)

The Debugger panel paused on a breakpoint in a network request handler, with the call stack and local scope open

The Debugger needs React Native 0.83 or later.

## Using the Debugger panel

The panel has three columns: **Sources** on the left, the open file with the expression box under it in the middle, and **Call stack**, **Scope** and **Breakpoints** on the right. Drag the edges between them to resize them; the sizes are saved between sessions.

### Finding a file

**Sources** lists your app’s original files, taken from the bundle’s source maps, as a folder tree under your project root. Folders inside `node_modules` start closed. Files appear once the app has loaded its bundle.

Type in **Filter files…** to swap the tree for a flat list of the files whose path contains the text, ignoring case.

Files changed by Fast Refresh are picked up on their own. If a change doesn’t show, use **Refresh sources**.

Press `Cmd`+`F` (`Ctrl`+`F` on Windows and Linux) to search the open file. Files are read-only.

### Setting breakpoints

Click a line number to add a breakpoint, and click it again to remove it. On a line with no code, the breakpoint moves down to the next line that has some. A red dot marks the files, and closed folders, that hold breakpoints, with a count when there is more than one.

**Breakpoints** lists every breakpoint as `file:line`. Click one to open its line, or use **Remove breakpoint** on the row. A dimmed dot means the breakpoint isn’t bound to the app yet, for example while a reloaded bundle loads.

Breakpoints stay set when the app reloads.

### Pausing and stepping

The app pauses when it reaches a breakpoint, showing **Paused on breakpoint** in the toolbar. Click **Pause** to stop at the next JavaScript the app runs instead, such as on your next tap. Each time it pauses, the panel opens the file at the paused line and highlights it.

While paused, use **Resume**, **Step over**, **Step into** and **Step out**. After a step the toolbar shows **Paused**. Your app’s JavaScript is frozen until you resume, so the app won’t respond to taps.

### Reading the call stack and variables

**Call stack** lists each frame’s function and `file:line`. Frames without source show **native**. Click a frame to open its line and show its variables in **Scope**.

**Scope** has a section for each scope of the selected frame, such as **Local**, **Closure** and **Global**. **Global** starts closed.

### Evaluating expressions

While paused, type an expression in the box under the source and press `Enter`. It runs in the frame selected in **Call stack**, and the frame’s variable names are suggested as you type. Results are listed under the box, newest at the bottom, and **Clear** empties the list.

## Limits and Troubleshooting

* The app doesn’t pause when it throws. Set a breakpoint in the `catch` or just before the throw.
* There are no conditional breakpoints, logpoints or keyboard shortcuts for stepping.
* The Debugger attaches to one device at a time. If more than one device runs your app on the same Metro, the Connection panel shows which one it uses. Close the app on the others.
* **No sources yet**: check the app is running and the Metro port in [**Settings > Connection**](/docs/desktop/settings/connection/) matches the one Metro is on.
* **This file’s source isn’t available**: the bundle’s source map has no source for this file.
