Skip to main content

Debugging and logging

Breakpoints can be a powerful debugging tool. Thanks to Radon IDE, breakpoints work in VSCode without any additional setup for React Native and Expo projects.

Setting a breakpoint

You can set a breakpoint on any JavaScript or TypeScript line of code. To set a breakpoint, click Click to add a breakpoint on the left margin of the line of code in your editor. The breakpoint will appear as a red dot next to this line.

The Radon IDE will automatically pause the application execution whenever it encounters a breakpoint.

Debugger options

When code execution is paused, the debugger overlay includes several options for further debugging:

  • Resume execution - resume code execution till the function ends, crashes or the debugger encounters another breakpoint,
  • Step over - execute the current line of code and pause on the next line,
  • Open debugger console - open the built-in VSCode log console.

Opening logs

Radon IDE keeps track of the application logs. You can access the device logs by clicking the Logs button in the top-right corner of the panel.

Jumping from log to code

In the logs panel, you can click the underlined component name on the right side of the panel to quickly jump to the exact line of code where the console log was called.

Expanding logs

Radon IDE logs objects in a contracted form. You can expand the object log by clicking on it to see more details.

Clearing logs console

You can clear the console by right-clicking inside the logs panel and choosing the Clear Console option or using the ⌘ K shortcut.

Handling runtime errors

Whenever a runtime error occurs in JavaScript code, the Radon IDE displays an error overlay and highlights the exact line of code where the error occurred.

You can click the Uncaught exception > button on the error overlay to resume code execution. Radon IDE will try to recover from the error whenever possible.