Skip to end of metadata
Go to start of metadata

CoffeeScript is becoming more and more essential for Web-development. With RubyMine 5 the support of this effective language includes debugging options. Now you can set breakpoints and debug your CoffeeScript code as you used to with Ruby or JavaScript.

0. Prerequisites

Make sure JetBrains Chrome Extension is installed. If it is not, please install it to your browser.

Turn on assets debug. File config/environments/development.rb should have property "config.assets.debug" set to "true"

1. Turn On Source Maps Generation

Add the following line to a Gemfile:

2. Create CoffeeScript Debug Run Configuration

Go to Run | Edit Configurations... and press + to add a new run/debug configuration. Choose JavaScript Debug -> Remote configuration:

For the configuration created add the following settings:

  • specify URL you're running your app at;
  • change a browser type to "Chrome";
  • provide the mapping to an assets directory.

3. Connect to Chrome

Run your application and make sure the URL specified in the settings works without errors.

Run CoffeeScript debug configuration and make sure there is a yellow bar with the text "JetBrains IDE Support is debugging this tab." on the top of the page you are working with:

To disconnect the debugging session you should close the yellow bar.

4. Debug Your Code

Go to a .coffee file and put a breakpoint. Now you can start debugging:

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.