Start the debugger session
RubyMine allows you to debug Ruby scripts, Rails applications, and tests. Starting a debugger session is very similar to running your code. The debugger is attached behind the scenes, so you don't have to configure anything specific to start a debugger session. The topics below describe how to run:
RubyMine allows you to debug code without previous configuring or by using the configured set of startup parameters - run/debug configurations. For instance, you can specify the following parameters for the Rails run/debug configuration: a server type (such as Puma or Passenger), IP address and port, environment (development by default), and so on.
Before debugging
Set breakpoints in the source code.
If necessary, create or modify the corresponding Run/Debug configuration.
Configure the debugger options on the Settings/Preferences | Build, Execution, Deployment | Debugger page.
Start debugging
Pause/Resume a debugger session
When the debugger session is running, you can pause/resume it as required using the buttons on the toolbar of the Debug tool window:
To pause a debugger session, click
.
To resume a debugger session, click
F9.
Terminate a debugger session
Click
on the toolbar of the Debug tool window. Alternatively, press Ctrl+F2 and select the process to terminate (if there are two or more of them).