Debugging
- Debugging
- Breakpoints
- Using Breakpoints
- Configuring Debugger Options
- Starting the Debugger Session
- Pausing and Resuming the Debugger Session
- Examining Suspended Program
- Exploring Frames
- Finding the Current Execution Point
- Stepping Through the Program
- Remote Debugging
- Monitoring the Debug Information
- Inline Debugging
- Live Editing of HTML, CSS, and JavaScript
- Viewing Actual HTML DOM
- Using JetBrains Chrome Extension
- Attaching to Local Process
Overview
This section describes the procedures that are common for various types of applications.
For details on debugging applications in the supported frameworks, refer to Language and Framework - Specific Guidelines.
RubyMine provides a full range of facilities for debugging your source code:
- Breakpoints in Ruby.
- Breakpoints in JavaScript.
- Customizable breakpoint properties: conditions, pass count, etc.
- Frames, variables, and watches views in the debugger UI.
- Runtime evaluation of expressions.
If you want to see a list of all currently debugging applications, select from the main menu. Refer to the section Viewing Running Processes for details.
General debugging steps
- Configure the debugger options.
- To debug CoffeeScript, TypeScript, and
Dart code, you need source maps generated in addition to the
JavaScript code.
Source maps set the correspondence between lines in your original code and in the generated JavaScript code, otherwise your breakpoints will not be recognised and processed correctly.
JavaScript and source maps are generated by transpiling the original code manually using the File Watcher of the corresponding type (CoffeeScript, TypeScript, or Dart). After that, you can debug the output JavaScript code.
For details, see Using File Watchers, Transpiling CoffeeScript to JavaScript, and Transpiling TypeScript to JavaScript.
- Define a run/debug configuration for the application to be debugged.
- Create breakpoints in the source code.
- Launch a debugging session.
- Pause or resume the debugging session as required.
- During the debugger session, step through the breakpoints, evaluate expressions, change values on-the-fly , examine suspended program, explore frames, and set watches .
After you've started a debug session, the icon that marks the Debug tool window toggles to to indicate that the debug process is active.
Important note
Debugging in RubyMine is possible in two ways:
- using the built-in debugger, which you will be prompted to install the first time you begin
debugging your application, depending on the Ruby version (e.g.:
ruby-debug-ide
,debase
,ruby-debug-base19
). Compatible gems of the built-in debugger will be installed into Ruby SDK. - using external debugger gems, like
debugger
(for Ruby 1.9) orbyebug
(for Ruby 2.x). Both of them require gemdebugger-xml
installed into SDK. This gem provides graphical interface for external debuggers.