Tutorial: Debug an application running with Foreman
Foreman is a tool for managing Procfile -based applications. For example, you can run the Rails server alongside with
webpack-dev-server to use live reloading:
In this tutorial, we'll show you how to create a separate run/debug configuration for running an application with Foreman, and how to debug this application.
Before working with Foreman, make sure that the 'foreman' gem is installed in the project SDK.
Create a configuration for running Foreman
First, we need to create a configuration for running or debugging an application that uses Foreman. RubyMine doesn't have a dedicated run configuration for Foreman. We'll use the Gem Command configuration that provides the ability to execute commands of arbitrary gems.
In the main menu, go to Gem Command from the list., click , and select
In the Run/Debug Configurations dialog, specify the following settings:
Name: Enter the run/debug configuration name, for example, foreman start.
Gem name: Specify the
Executable name: Select the
Arguments: Specify an argument for running the application using Foreman, for example,
Debug the application
To debug the newly created foreman start configuration, follow the steps below:
Set breakpoints in your application.
Press Ctrl twice and type the configuration name in the invoked Run Anything popup:
Press and hold down the Shift key (the dialog title changes to Debug) and press Enter.
Perform the required steps in your application to stop on a breakpoint. RubyMine will suspend the application execution before the breakpoint.