Skip to content

Commit 37d0a64

Browse files
viuginick1valich
authored andcommitted
[RUBY-23972] Improve ruby-debug-ide documentation
1 parent b4aff0d commit 37d0a64

File tree

2 files changed

+435
-4
lines changed

2 files changed

+435
-4
lines changed

README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
1-
[gem]: https://rubygems.org/gems/ruby-debug-ide
2-
# ruby-debug-ide
3-
An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
4-
51
[![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
62
[![Gem Version](https://badge.fury.io/rb/ruby-debug-ide.svg)][gem]
73
[![Build Status](https://travis-ci.org/ruby-debug/ruby-debug-ide.svg?branch=master)](https://travis-ci.org/ruby-debug/ruby-debug-ide)
4+
5+
[gem]: https://rubygems.org/gems/ruby-debug-ide
6+
# ruby-debug-ide
7+
8+
The 'ruby-debug-ide' gem provides the protocol to establish communication between the debugger engine (such as [debase](https://rubygems.org/gems/debase) or [ruby-debug-base](https://rubygems.org/gems/ruby-debug-base)) and IDEs (for example, RubyMine, Visual Studio Code, or Eclipse). 'ruby-debug-ide' redirect commands from the IDE to the debugger engine. Then, it returns answers/events received from the debugger engine to the IDE. To learn more about a communication protocol, see the following document: [ruby-debug-ide protocol](protocol-spec.md).
9+
10+
## Install debugging gems
11+
Depending on the used Ruby version, you need to add/install the following debugging gems to the Gemfile:
12+
- Ruby 2.x - [ruby-debug-ide](https://rubygems.org/gems/ruby-debug-ide) and [debase](https://rubygems.org/gems/debase)
13+
- Ruby 1.9.x - [ruby-debug-ide](https://rubygems.org/gems/ruby-debug-ide) and [ruby-debug-base19x](https://rubygems.org/gems/ruby-debug-base19x)
14+
- jRuby or Ruby 1.8.x - [ruby-debug-ide](https://rubygems.org/gems/ruby-debug-ide) and [ruby-debug-base](https://rubygems.org/gems/ruby-debug-base)
15+
> For Windows, make sure that the Ruby [DevKit](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit) is installed.
16+
17+
## Start debugging session
18+
To start the debugging session for a Rails application, run the following command:
19+
```shell
20+
rdebug-ide --host 0.0.0.0 --port 1234 --dispatcher-port 1234 -- bin/rails s
21+
```
22+
If you want to debug a Rails application run using Docker Compose, you need to start the Rails server from the Docker in the following way:
23+
```yaml
24+
command: bundle exec rdebug-ide --host 0.0.0.0 --port 1234 -- bin/rails s -p 3000 -b 0.0.0.0
25+
volumes:
26+
- .:/sample_rails_app
27+
ports:
28+
- "1234:1234"
29+
- "3000:3000"
30+
- "26162:26162"
31+
```
32+
Note that all ports above should be exposed in the Dockerfile.

0 commit comments

Comments
 (0)