-
Notifications
You must be signed in to change notification settings - Fork 81
Ruby attach to process #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
3681a05
72b1c4a
768323f
fa128e1
645aab6
0c2a329
9c96a76
32f61fe
36d3686
096cd72
c066895
cede127
ea4af28
7a15fac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,14 +4,16 @@ | |
| require 'thread' | ||
| if RUBY_VERSION < '2.0' || defined?(JRUBY_VERSION) | ||
| require 'ruby-debug-base' | ||
| Debugger::FRONT_END = "ruby-debug-base" | ||
| else | ||
| require 'debase' | ||
| Debugger::FRONT_END = "debase" | ||
| end | ||
|
|
||
| require 'ruby-debug-ide/version' | ||
| require 'ruby-debug-ide/xml_printer' | ||
| require 'ruby-debug-ide/ide_processor' | ||
| require 'ruby-debug-ide/event_processor' | ||
| require_relative 'ruby-debug-ide/version' | ||
|
||
| require_relative 'ruby-debug-ide/xml_printer' | ||
| require_relative 'ruby-debug-ide/ide_processor' | ||
| require_relative 'ruby-debug-ide/event_processor' | ||
|
|
||
| module Debugger | ||
|
|
||
|
|
@@ -110,7 +112,6 @@ def start_control(host, port, notify_dispatcher) | |
| server = TCPServer.new(host, port) | ||
| print_greeting_msg(host, port) | ||
| notify_dispatcher(port) if notify_dispatcher | ||
|
|
||
| while (session = server.accept) | ||
| $stderr.puts "Connected from #{session.peeraddr[2]}" if Debugger.cli_debug | ||
| dispatcher = ENV['IDE_PROCESS_DISPATCHER'] | ||
|
|
@@ -160,8 +161,8 @@ def notify_dispatcher(port) | |
| return unless ENV['IDE_PROCESS_DISPATCHER'] | ||
| acceptor_host, acceptor_port = ENV['IDE_PROCESS_DISPATCHER'].split(":") | ||
| acceptor_host, acceptor_port = '127.0.0.1', acceptor_host unless acceptor_port | ||
|
|
||
| connected = false | ||
|
|
||
| 3.times do |i| | ||
| begin | ||
| s = TCPSocket.open(acceptor_host, acceptor_port) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't that happen automatically when you add a breakpoint?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@denofevil Yes, It would. But without this line you can't click "Pause" before setting any breakpoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@equivalence1 that would mean that pause will not work without breakpoints in normal mode, but it does