Skip to content

Commit 8add0a9

Browse files
committed
Dividing 'debug-commons' into two projects:
- ruby-debug-ide: wrapper for ruby-debug-base - classic-debug-ide: wrapper for classic debug.rb to make further development more smooth. classic-debug-ide is getting deprecated by availability of ruby-debug-base for MRI, JRuby and Rubinius
0 parents  commit 8add0a9

39 files changed

+3190
-0
lines changed

Diff for: CHANGES

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
0.1.10 - 0.1.11
2+
--------------
3+
4+
* bugfix: [#17601] Cannot connect to debugger using ipv6
5+
6+
0.1.9 - 0.1.10
7+
--------------
8+
9+
* fixed bug when inspected variable's to_s methods returns non-String.
10+
Returns diagonstic message now.
11+
* do not use '==' from within debugger to prevent runtime error
12+
* Workarounding JRuby issue (http://jira.codehaus.org/browse/JRUBY-2063)
13+
* switching to ruby-debug-base 0.1.10 (all tests pass)
14+
15+
0.1.8 - 0.1.9
16+
-------------
17+
18+
* be sure 'exit' is always called.
19+
* to_inspect = str.gsub(/\\n/, "\n") in debug_eval() to make possible to
20+
evaluate multiline expressions. Frontend must escape new lines
21+
accordingly.
22+
* prevent exception when to_s returns nil on being evaluated value
23+
24+
0.1.7 - 0.1.8
25+
-------------
26+
27+
* fixed error during breakpoint removing
28+
* (protocols merge) print debug message on $stderr like classic debugger
29+
30+
0.1.6 - 0.1.7
31+
-------------
32+
33+
* ensure 'yaml' (is_binary_data?) is always loaded in xml_printer.rb
34+
* VarInstanceCommand enumerates also variables of an object's class, as it
35+
is done in the classic-debugger
36+
* do not send unneeded end-of-lines (fast and classic protocol merging)
37+
* do not send non-xml PROMPT and CONFIRM + getting rid of 'confirm' methods
38+
in the whole codebase (fast and classic protocol merging)
39+
* send info <message> when 'delete' is used without given 'pos' (deleting of
40+
all breakpoints is not supported)
41+
* return <error> on 'delete <negative_int>' (protocol unification)
42+
* always use one-based frame numbering (was not the case in <frame[s]>)
43+
* send message 'finished' back when exiting
44+
45+
0.1.5 - 0.1.6
46+
-------------
47+
48+
* do not send binary data within values of variables. See
49+
http://www.netbeans.org/nonav/issues/show_bug.cgi?id=101748 for more
50+
details
51+
52+
0.1.4 - 0.1.5
53+
-------------
54+
55+
* fixed subtle bug in xml_printer.rb#print_variable which caused the
56+
debugger to die when == method was overridden and did not count on nil
57+
parameters
58+
* Hash and Array subclasses did not have children thus cannot be expanded in
59+
a GUI. E.g. @params in Rails controller (HashWithIndifferentAccess)
60+
61+
0.1.3 - 0.1.4
62+
-------------
63+
64+
* migration to ruby-debug 0.1.4
65+
66+
0.1.2 - 0.1.3
67+
-------------
68+
69+
* adding step+ and next+ commands (since ruby-debug 0.9.1)
70+

Diff for: ChangeLog

Whitespace-only changes.

Diff for: MIT-LICENSE

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
The file lib/classic-debug.rb is based on the debug.rb file from Ruby
2+
project.
3+
4+
Copyright (c) 2007-2008, debug-commons team
5+
6+
Permission is hereby granted, free of charge, to any person obtaining
7+
a copy of this software and associated documentation files (the
8+
"Software"), to deal in the Software without restriction, including
9+
without limitation the rights to use, copy, modify, merge, publish,
10+
distribute, sublicense, and/or sell copies of the Software, and to
11+
permit persons to whom the Software is furnished to do so, subject to
12+
the following conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+

Diff for: Rakefile

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
require 'rubygems'
2+
require 'rake/gempackagetask'
3+
require 'rake/rdoctask'
4+
require 'rake/testtask'
5+
require 'date'
6+
7+
desc 'Default: run unit tests.'
8+
task :default => [:test]
9+
10+
# ------- Default Package ----------
11+
RUBY_DEBUG_BASE="0.10.0"
12+
RUBY_DEBUG_IDE_VERSION = "0.1.11"
13+
14+
FILES = FileList[
15+
'README',
16+
'bin/*',
17+
'lib/**/*'
18+
]
19+
20+
ide_spec = Gem::Specification.new do |spec|
21+
spec.name = "ruby-debug-ide"
22+
23+
spec.homepage = "http://rubyforge.org/projects/debug-commons/"
24+
spec.summary = "IDE interface for ruby-debug."
25+
spec.description = <<-EOF
26+
An interface which glues ruby-debug to IDEs like Eclipse (RDT) and NetBeans.
27+
EOF
28+
29+
spec.version = RUBY_DEBUG_IDE_VERSION
30+
31+
spec.author = "Markus Barchfeld, Martin Krauskopf"
32+
spec.email = "[email protected]"
33+
spec.platform = Gem::Platform::RUBY
34+
spec.require_path = "lib"
35+
spec.bindir = "bin"
36+
spec.executables = ["rdebug-ide"]
37+
spec.autorequire = "ruby-debug-base"
38+
spec.files = FILES.to_a
39+
40+
spec.required_ruby_version = '>= 1.8.2'
41+
spec.date = DateTime.now
42+
spec.rubyforge_project = 'debug-commons'
43+
spec.add_dependency('ruby-debug-base', RUBY_DEBUG_BASE)
44+
45+
# rdoc
46+
spec.has_rdoc = false
47+
end
48+
49+
# Rake task to build the default package
50+
Rake::GemPackageTask.new(ide_spec) do |pkg|
51+
pkg.need_tar = true
52+
end
53+
54+
# Unit tests
55+
Rake::TestTask.new do |t|
56+
t.libs << ["test", "test-base"]
57+
t.pattern = 'test/*_test.rb'
58+
t.verbose = true
59+
t.warning = false
60+
end
61+
62+
63+
desc "Create a GNU-style ChangeLog via svn2cl"
64+
task :ChangeLog do
65+
system("svn2cl --authors=svn2cl_usermap svn://rubyforge.org/var/svn/debug-commons/ruby-debug-ide/trunk -o ChangeLog")
66+
end
67+
68+
#desc "Publish ruby-debug to RubyForge."
69+
#task :publish do
70+
# require 'rake/contrib/sshpublisher'
71+
#
72+
# # Get ruby-debug path
73+
# ruby_debug_path = File.expand_path(File.dirname(__FILE__))
74+
#
75+
# publisher = Rake::SshDirPublisher.new("[email protected]",
76+
# "/var/www/gforge-projects/ruby-debug", ruby_debug_path)
77+
#end
78+
#
79+
#desc "Clear temp files"
80+
#task :clean do
81+
# cd "ext" do
82+
# if File.exists?("Makefile")
83+
# sh "make clean"
84+
# rm "Makefile"
85+
# end
86+
# end
87+
#end
88+
#
89+
## --------- RDoc Documentation ------
90+
#desc "Generate rdoc documentation"
91+
#Rake::RDocTask.new("rdoc") do |rdoc|
92+
# rdoc.rdoc_dir = 'doc'
93+
# rdoc.title = "ruby-debug"
94+
# # Show source inline with line numbers
95+
# rdoc.options << "--inline-source" << "--line-numbers"
96+
# # Make the readme file the start page for the generated html
97+
# rdoc.options << '--main' << 'README'
98+
# rdoc.rdoc_files.include('bin/**/*',
99+
# 'lib/**/*.rb',
100+
# 'ext/**/ruby_debug.c',
101+
# 'README',
102+
# 'LICENSE')
103+
#end

Diff for: bin/rdebug-ide

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/usr/bin/env ruby
2+
3+
require 'rubygems'
4+
require 'optparse'
5+
require "ostruct"
6+
require 'ruby-debug'
7+
8+
$stdout.sync=true
9+
10+
options = OpenStruct.new(
11+
'host' => nil,
12+
'port' => 1234,
13+
'tracing' => false,
14+
'frame_bind' => false
15+
)
16+
17+
opts = OptionParser.new do |opts|
18+
opts.banner = <<EOB
19+
Using ruby-debug-base #{Debugger::VERSION}
20+
Usage: rdebug-ide is supposed to be called from RDT or NetBeans. The command line interface to ruby-debug is rdebug.
21+
EOB
22+
opts.separator ""
23+
opts.separator "Options:"
24+
opts.on("-h", "--host HOST", "Host name used for remote debugging") {|options.host|}
25+
opts.on("-p", "--port PORT", Integer, "Port used for remote debugging") {|options.port|}
26+
opts.on("-x", "--trace", "turn on line tracing") {options.tracing = true}
27+
opts.on("-d", "--debug", "Debug self - prints information for debugging ruby-debug itself") do
28+
Debugger.is_debug = true
29+
end
30+
opts.on("-I", "--include PATH", String, "Add PATH to $LOAD_PATH") do |path|
31+
$LOAD_PATH.unshift(path)
32+
end
33+
34+
opts.on("--keep-frame-binding", "Keep frame bindings") {options.frame_bind = true}
35+
opts.separator ""
36+
opts.separator "Common options:"
37+
opts.on_tail("-v", "--version", "Show version") do
38+
puts "Using ruby-debug-base #{Debugger::VERSION}"
39+
exit
40+
end
41+
end
42+
43+
begin
44+
Debugger::ARGV = ARGV.clone
45+
rdebug_path = File.expand_path($0)
46+
if RUBY_PLATFORM =~ /mswin/
47+
rdebug_path += ".cmd" unless rdebug_path =~ /\.cmd$/i
48+
end
49+
Debugger::RDEBUG_SCRIPT = rdebug_path
50+
opts.parse! ARGV
51+
rescue StandardError => e
52+
puts opts
53+
puts
54+
puts e.message
55+
exit(1)
56+
end
57+
58+
if ARGV.empty?
59+
puts opts
60+
puts
61+
puts "Must specify a script to run"
62+
exit(1)
63+
end
64+
65+
# save script name
66+
Debugger::PROG_SCRIPT = ARGV.shift
67+
68+
# install interruption handler
69+
trap('INT') { Debugger.interrupt_last }
70+
71+
# set options
72+
Debugger.keep_frame_binding = options.frame_bind
73+
74+
Debugger.main(options.host, options.port)
75+

Diff for: config.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Do not commit personal changes here back to the repository. Create
2+
# config.private.yaml which, if exists, is preferred to this one.
3+
4+
# full path to the rdebug-ide executable. You don't need to set it if the
5+
# rdebug-ide is on the system path ($PATH, %PATH%)
6+
#rdebug_ide: /path/to/rubygems/gemrepo/bin/rdebug-ide
7+
8+
# verbose output from test
9+
debug: false
10+
11+
# verbose output from the backend
12+
verbose_server: false
13+
14+
# timeout for the server to start up (in seconds)
15+
server_start_up_timeout: 5
16+
17+
# either should be on the $PATH or use full path
18+
interpreter: ruby
19+
20+
# whether the interpreter is JRuby (XXX poll the interpreter for this info)
21+
is_jruby: false
22+
23+
# whether to run JRuby instance in debug mode
24+
debug_jruby: false
25+

Diff for: etc/build_and_install.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
# You may pass -n options to say that the user has all needed access and 'sudo'
4+
# is not needed
5+
6+
echo "Installing"
7+
[ -d pkg ] && rm -r pkg
8+
rake package
9+
gem_command="gem install -l pkg/ruby-debug-ide-0.1.11.gem"
10+
if [ "$1" = "-n" ]; then
11+
eval "$gem_command"
12+
else
13+
eval "sudo $gem_command"
14+
fi

Diff for: etc/kill_debugger

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
# Trivial, but handy, script which might become helpful during testing phase.
4+
# Use with care ;)
5+
6+
pgrep -f ruby.*\ -I.*classic-debug && echo Killing... && pkill -9 -f ruby.*\ -I.*classic-debug
7+
pgrep -f rdebug-ide.*-p && echo Killing... && pkill -9 -f rdebug-ide.*-p

0 commit comments

Comments
 (0)