pry-debugger-jruby 1.0.0-java → 1.1.0-java
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 -0
- data/lib/pry-debugger-jruby/base.rb +40 -2
- data/lib/pry-debugger-jruby/commands.rb +3 -0
- data/lib/pry-debugger-jruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c487da46079e6318b389b2f3d27685e720d7cfe9
|
4
|
+
data.tar.gz: 2bb4cbd26d84c4ac9a26f1b065ce4af41be66f20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6e33901b57631b130cb2efdcacb18866967434f58f13c597795b21f5ae94de5942d7de7ed9cfc9774600f43b5c95927b1c77dd72aeb43aea8ec2df1c8da0912
|
7
|
+
data.tar.gz: 1f49db5d4716dbeb307a98ddb4b048d5ba5fec4d9401c9353b5ed6bf4d68fc43cf82cda6d8c1b8815577d5ebf2635d5e3c8e9339cce1ae0d032da4c5c40913d3
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,29 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'java'
|
3
3
|
|
4
|
+
module PryDebuggerJRuby
|
4
5
|
extend self
|
5
6
|
|
7
|
+
private
|
8
|
+
|
9
|
+
def list_pry_files
|
10
|
+
spec = Gem::Specification.find_by_name('pry')
|
11
|
+
|
12
|
+
if spec
|
13
|
+
Dir[File.join(spec.gem_dir, '**', '*rb')]
|
14
|
+
else
|
15
|
+
[]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def list_debugger_files
|
20
|
+
Dir[File.join(File.dirname(__FILE__), '..', '**', '*.rb')].map { |f| File.expand_path(f) }
|
21
|
+
end
|
22
|
+
|
23
|
+
public
|
24
|
+
|
25
|
+
TRACE_IGNORE_FILES = [*list_debugger_files, *list_pry_files].freeze
|
26
|
+
|
6
27
|
# Checks that a binding is in a local file context. Extracted from
|
7
28
|
# https://github.com/pry/pry/blob/master/lib/pry/default_commands/context.rb
|
8
29
|
def check_file_context(target)
|
@@ -10,6 +31,23 @@ module PryDebuggerJRuby
|
|
10
31
|
file == Pry.eval_path || (file !~ /(\(.*\))|<.*>/ && file != '' && file != '-e')
|
11
32
|
end
|
12
33
|
|
34
|
+
def check_trace_enabled
|
35
|
+
return true if org.jruby.RubyInstanceConfig.FULL_TRACE_ENABLED
|
36
|
+
warn <<-EOS
|
37
|
+
You are currently running JRuby without the --debug flag enabled, and without it this command will not work correctly.
|
38
|
+
|
39
|
+
To fix it, either:
|
40
|
+
|
41
|
+
* add the --debug flag to your ruby/jruby command
|
42
|
+
* or add the --debug flag to the JRUBY_OPTS environment variable
|
43
|
+
* or enable the jruby.debug.fullTrace option
|
44
|
+
|
45
|
+
Do note that having this option on all the time has a performance penalty, so we recommend you only enable it while debugging.
|
46
|
+
Safe prying, fellow rubyst!
|
47
|
+
EOS
|
48
|
+
false
|
49
|
+
end
|
50
|
+
|
13
51
|
# Reference to currently running pry-remote server. Used by the processor.
|
14
52
|
attr_accessor :current_remote_server
|
15
53
|
end
|
@@ -141,6 +141,7 @@ module PryDebuggerJRuby
|
|
141
141
|
elsif args.empty?
|
142
142
|
run 'breakpoints'
|
143
143
|
else
|
144
|
+
return unless PryDebuggerJRuby.check_trace_enabled
|
144
145
|
new_breakpoint
|
145
146
|
end
|
146
147
|
end
|
@@ -212,6 +213,8 @@ module PryDebuggerJRuby
|
|
212
213
|
|
213
214
|
helpers do
|
214
215
|
def breakout_navigation(action, times = nil)
|
216
|
+
return unless PryDebuggerJRuby.check_trace_enabled
|
217
|
+
|
215
218
|
_pry_.binding_stack.clear # Clear the binding stack
|
216
219
|
throw :breakout_nav, { # Break out of the REPL loop and
|
217
220
|
action: action, # signal the tracer
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-debugger-jruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Ivo Anjo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|