ruby-debug-ide 0.6.0 → 0.6.1.beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog.md +5 -1
- data/lib/ruby-debug-ide/commands/catchpoint.rb +19 -4
- data/lib/ruby-debug-ide/version.rb +1 -1
- data/lib/ruby-debug-ide/xml_printer.rb +10 -6
- data/ruby-debug-ide.gemspec +1 -0
- metadata +11 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c595acd0041d7e04f8a165c1c50538e1f9d30929
|
4
|
+
data.tar.gz: 1448c05343af9063bdd3b51442e8067849e8cc45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61810c4fac4c0f03b155063ccc06e0012ddb34c5c38990e0570a0c91069780f1ea907bf63a2578c8878a30ad29b0fe914d7ab5911094856182555d114005d7dd
|
7
|
+
data.tar.gz: a40a067d48e1c5444d94559a783f1173bdd5670a23d0d7e2161a1bea450a63f91dba56b47b7af8c2ff30408203200a61e8b4abacfc405d6a5b28dc3671ca5797
|
data/ChangeLog.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
## [master](https://github.com/ruby-debug/ruby-debug-ide/compare/v0.
|
1
|
+
## [master](https://github.com/ruby-debug/ruby-debug-ide/compare/v0.6.0...master)
|
2
|
+
|
3
|
+
* let's use Debugger#remove_catchpoint and Debugger#clear_catchpoints if available
|
4
|
+
|
5
|
+
## [0.6.0](https://github.com/ruby-debug/ruby-debug-ide/compare/v0.5.0...0.6.0)
|
2
6
|
|
3
7
|
* "file-filter on|off" command added
|
4
8
|
* "include file|dir" command added
|
@@ -16,21 +16,20 @@ module Debugger
|
|
16
16
|
elsif not @match[2]
|
17
17
|
# One arg given.
|
18
18
|
if 'off' == excn
|
19
|
-
|
19
|
+
clear_catchpoints
|
20
20
|
else
|
21
21
|
Debugger.add_catchpoint(excn)
|
22
22
|
print_catchpoint_set(excn)
|
23
23
|
end
|
24
24
|
elsif @match[2] != 'off'
|
25
25
|
errmsg "Off expected. Got %s\n", @match[2]
|
26
|
-
elsif
|
27
|
-
Debugger.catchpoints.delete(excn)
|
26
|
+
elsif remove_catchpoint(excn)
|
28
27
|
print_catchpoint_deleted(excn)
|
29
28
|
else
|
30
29
|
errmsg "Catch for exception %s not found.\n", excn
|
31
30
|
end
|
32
31
|
end
|
33
|
-
|
32
|
+
|
34
33
|
class << self
|
35
34
|
def help_command
|
36
35
|
'catch'
|
@@ -45,5 +44,21 @@ module Debugger
|
|
45
44
|
}
|
46
45
|
end
|
47
46
|
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def clear_catchpoints
|
51
|
+
if Debugger.respond_to?(:clear_catchpoints)
|
52
|
+
Debugger.clear_catchpoints
|
53
|
+
else
|
54
|
+
Debugger.catchpoints.clear
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def remove_catchpoint(excn)
|
59
|
+
return Debugger.remove_catchpoint(excn) if Debugger.respond_to?(:remove_catchpoint)
|
60
|
+
return Debugger.catchpoints.delete(excn) if Debugger.catchpoints.member?(excn)
|
61
|
+
false
|
62
|
+
end
|
48
63
|
end
|
49
64
|
end
|
@@ -199,13 +199,13 @@ module Debugger
|
|
199
199
|
def print_breakpoints(breakpoints)
|
200
200
|
print_element 'breakpoints' do
|
201
201
|
breakpoints.sort_by{|b| b.id }.each do |b|
|
202
|
-
print "<breakpoint n=\"%d\" file=\"%s\" line=\"%s\" />", b.id, b.source, b.pos.to_s
|
202
|
+
print "<breakpoint n=\"%d\" file=\"%s\" line=\"%s\" />", b.id, CGI.escapeHTML(b.source), b.pos.to_s
|
203
203
|
end
|
204
204
|
end
|
205
205
|
end
|
206
206
|
|
207
207
|
def print_breakpoint_added(b)
|
208
|
-
print "<breakpointAdded no=\"%s\" location=\"%s:%s\"/>", b.id, b.source, b.pos
|
208
|
+
print "<breakpointAdded no=\"%s\" location=\"%s:%s\"/>", b.id, CGI.escapeHTML(b.source), b.pos
|
209
209
|
end
|
210
210
|
|
211
211
|
def print_breakpoint_deleted(b)
|
@@ -289,14 +289,14 @@ module Debugger
|
|
289
289
|
# Events
|
290
290
|
|
291
291
|
def print_breakpoint(_, breakpoint)
|
292
|
-
print("<breakpoint file=\"%s\" line=\"%s\" threadId=\"%d\"/>",
|
293
|
-
breakpoint.source, breakpoint.pos, Debugger.current_context.thnum)
|
292
|
+
print("<breakpoint file=\"%s\" line=\"%s\" threadId=\"%d\"/>",
|
293
|
+
CGI.escapeHTML(breakpoint.source), breakpoint.pos, Debugger.current_context.thnum)
|
294
294
|
end
|
295
295
|
|
296
296
|
def print_catchpoint(exception)
|
297
297
|
context = Debugger.current_context
|
298
298
|
print("<exception file=\"%s\" line=\"%s\" type=\"%s\" message=\"%s\" threadId=\"%d\"/>",
|
299
|
-
context.frame_file(0), context.frame_line(0), exception.class, CGI.escapeHTML(exception.to_s), context.thnum)
|
299
|
+
CGI.escapeHTML(context.frame_file(0)), context.frame_line(0), exception.class, CGI.escapeHTML(exception.to_s), context.thnum)
|
300
300
|
end
|
301
301
|
|
302
302
|
def print_trace(context, file, line)
|
@@ -401,7 +401,11 @@ module Debugger
|
|
401
401
|
end
|
402
402
|
|
403
403
|
def safe_to_string(value)
|
404
|
-
|
404
|
+
begin
|
405
|
+
str = value.to_s
|
406
|
+
rescue NoMethodError
|
407
|
+
str = "(Object doesn't support #to_s)"
|
408
|
+
end
|
405
409
|
return str unless str.nil?
|
406
410
|
|
407
411
|
string_io = StringIO.new
|
data/ruby-debug-ide.gemspec
CHANGED
@@ -32,6 +32,7 @@ EOF
|
|
32
32
|
|
33
33
|
spec.author = "Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains RubyMine Team"
|
34
34
|
spec.email = "rubymine-feedback@jetbrains.com"
|
35
|
+
spec.license = "MIT"
|
35
36
|
spec.platform = Gem::Platform::RUBY
|
36
37
|
spec.require_path = "lib"
|
37
38
|
spec.bindir = "bin"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-debug-ide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains RubyMine Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -24,8 +24,10 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.8.1
|
27
|
-
description:
|
28
|
-
|
27
|
+
description: 'An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans
|
28
|
+
and RubyMine.
|
29
|
+
|
30
|
+
'
|
29
31
|
email: rubymine-feedback@jetbrains.com
|
30
32
|
executables:
|
31
33
|
- rdebug-ide
|
@@ -72,7 +74,8 @@ files:
|
|
72
74
|
- lib/ruby-debug-ide/xml_printer.rb
|
73
75
|
- ruby-debug-ide.gemspec
|
74
76
|
homepage: https://github.com/ruby-debug/ruby-debug-ide
|
75
|
-
licenses:
|
77
|
+
licenses:
|
78
|
+
- MIT
|
76
79
|
metadata: {}
|
77
80
|
post_install_message:
|
78
81
|
rdoc_options: []
|
@@ -85,12 +88,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
85
88
|
version: 1.8.2
|
86
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
90
|
requirements:
|
88
|
-
- - "
|
91
|
+
- - ">"
|
89
92
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
93
|
+
version: 1.3.1
|
91
94
|
requirements: []
|
92
95
|
rubyforge_project: debug-commons
|
93
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.5.1
|
94
97
|
signing_key:
|
95
98
|
specification_version: 4
|
96
99
|
summary: IDE interface for ruby-debug.
|