ruby-debug / ruby-debug Goto Github PK
View Code? Open in Web Editor NEWruby-debug for Ruby 1.8
Home Page: http://teamcity.jetbrains.com/project.html?projectId=project51
License: BSD 2-Clause "Simplified" License
ruby-debug for Ruby 1.8
Home Page: http://teamcity.jetbrains.com/project.html?projectId=project51
License: BSD 2-Clause "Simplified" License
= ruby-debug == Content This repository contains sources of two gems: * ruby-debug-base - backend for the ruby (mri & jruby) debugger: https://rubygems.org/gems/ruby-debug-base * ruby-debug - CLI for the ruby-debug-base: https://rubygems.org/gems/ruby-debug == Overview ruby-debug is a fast implementation of the standard debugger debug.rb. The faster execution speed is achieved by utilizing a new hook in the Ruby C API. == Requirements ruby-debug requires Ruby 1.8.4 or higher. Unless you get the packages as a binary (Microsoft Windows binaries are sometimes available), you'll need a C compiler and Ruby development headers, and a Make program so the extension in ruby-debug-base can be compiled when it is installed. To install on Microsoft Windows, unless you run under cygwin or mingw you'll need Microsoft Visual C++ 6.0 also known as VC6. http://rubyforge.org/tracker/index.php?func=detail&aid=16774&group_id=1900&atid=7436 suggests why. == Install ruby-debug is provided as a RubyGem. To install: <tt>gem install ruby-debug</tt> This should also pull in <tt>ruby-debug-base</tt> as a dependency. (If you install ruby-debug-base explicitly, you can add in the <tt>--test</tt> option after "install" to have the regression test run before installing.) For Emacs support and the Reference Manual, get <tt>ruby-debug-extra</tt>. This is not a RubyGem, you'll need a Make program and a POSIX shell. With this installed, run: sh ./configure make make test # optional, but a good idea sudo make install ==== Install on MS Windows Compiling under cygwin or mingw works like it does on Unix. * Have Microsoft Visual C++ 6.0 (VC6) installed - exactly that version. * Set the appropriate environment variables. * run `nmake'. * Copy ruby_debug.so to `win32'. * Go to the ruby_debug root. * rake win32_gem * The file is in named `rdebug-debug-base-0.10.0-mswin32.gem'. == Usage There are two ways of running ruby-debug. === rdebug executable: $ rdebug <your-script> When you start your script this way, the debugger will stop at the first line of code in the script file. So you will be able to set up your breakpoints. === ruby-debug API The second way is to use the ruby-debug API to interrupt your code execution at run time. require 'ruby-debug' ; Debugger.start ... def your_method ... debugger ... end or require 'ruby-debug' ; Debugger.start do ... debugger end When Kernel#debugger method is executed, the debugger is activated and you will be able to inspect and step through your code. == Performance The <tt>debug.rb</tt> script that comes with the standard Ruby library uses <tt>Kernel#set_trace_func</tt> API. Implementing the debugger in pure Ruby has a negative impact on the speed of your program execution. This is because the Ruby interpreter creates a Binding object each trace call, even though it is not being used most of the time. ruby-debug moves most of the functionality for Binding access and for breakpoint testing to a native extension. Because this code is in C and because and can be selectively enabled or disabled, the overhead in running your program can be minimized. == License See LICENSE for license information. = ruby-debug-base for JRuby == Overview (j)ruby-debug-base provides the fast debugger extension for JRuby interpreter. It is the same as ruby-debug-base native C extension from ruby-debug project (http://rubyforge.org/projects/ruby-debug/), but for JRuby. == Install (j)ruby-debug-base is available as a RubyGem: jruby -S gem install ruby-debug-base == Usage The usage is then the same as with native ruby-debugger, but you might need to force JRuby which has to run in interpreted mode. Simplest usage is: $ jruby --debug -S rdebug <your-script> Or easier, you might create 'jruby-dm' ('dm' for 'debugger-mode'): $ cat ~/bin/jruby-dm #!/bin/bash jruby --debug "$@" Then you may run just as you used to: $ jruby-dm -S rdebug <your-script> For more information see: http://bashdb.sourceforge.net/ruby-debug.html To build run: $ rake java gem == License See MIT-LICENSE for license information.
ruby-debug-base, at least for C, needs a dependency on rake-compiler. This is probably a simple thing to do, but it would be nice to get this in the best way.
Is there a way to say it's needed for building, but not if say a architecture-specific gem were used?
Is there a particular release of rake-compiler needed or will all/most releases work?
I'm trying to install ruby-debug on a fresh install of Mountain Lion with the latest command line tools and ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0], but I can't get it to install. Here is the full error:
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
creating Makefile
make
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c trace_nums.c
xcrun: Error: failed to exec real xcrun. (No such file or directory)
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o trace_nums.bundle trace_nums.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lpthread -ldl -lobjc
clang: error: no such file or directory: 'trace_nums.o'
make: *** [trace_nums.bundle] Error 1
Unless test/base/load.rb is run in isolation, it causes test failures in test/base/base.rb on MRI:
1) Failure:
test_current_context(TestRubyDebug) [/Users/jfire/Development/ruby-debug/test/base/base.rb:23]:
<TestRubyDebug> expected but was
<nil>.
original windows-message in german:
'Der Befehl "ruby" ist entweder falsch geschrieben oder konnte nicht gefunden werden.'
may be in english: 'The command "ruby" is misspelled or could not be found'
Reason:
jruby\lib\ruby\gems\1.8\gems\ruby-debug-0.10.4\bin\rdebug -- line: 115
output = 'ruby -c #{Debugger::PROG_SCRIPT.inspect} 2>&1'
would work if i have any ruby.exe in my (windows-) path.
Works when i change "ruby" to "jruby".
Recently we got a fix out in ruby-debug-base 0.11.0 for JRuby, but because ruby-debug has not had a release it's not possible to resolve both in a Gemfile.
It has been over 3 years since a commit merged to master
. There are open PR's and issues spanning years without acknowledgement.
If this gem is no longer maintained, would a maintainer please update README to say so?
Attempt to load readline raises ArgumentError
.
Current line is printed on remote stdout instead of rdebug --client
stdout.
gems/ruby-debug-0.10.6/cli/ruby-debug/commands/list.rb:36: warning: `-' after local variable or literal is interpreted as binary operator
gems/ruby-debug-0.10.6/cli/ruby-debug/commands/list.rb:36: warning: even though it seems like unary operator
Currently when the latest version of the gem is installed, under cli/ruby-debug
, there's both a processor.rb
and a processor.RB
, and a commands/source.rb
and a commands/source.RB
. And the files are actually different.
Under cli/
there's also continue.RB
, disassemble.RB
, raise.RB
with no uncapitalized counterparts.
Apart from not being in this gem's source code, the duplicate files wreak havoc on case-insensitive filesystems (such as OSX's) when used with version control systems.
Reported here.
The linecache code is for the JRuby version of ruby-debug-base. It should be moved out to a JRuby version of the linecache gem.
The following JRuby bug seems to be a ruby-debug bug: http://jira.codehaus.org/browse/JRUBY-6083
The problem here is that two threads are active, one of them enters debug code and sleeps (presumably waiting for IDE or user feedback) and then all other threads freeze waiting for that debug code to proceed.
The problem is that DebugEventHook always synchronizes against itself when entering debug code. This works ok for non-blocking debugging, but in any case where someone is attempting to step through code or inspect state, all other threads grind to a halt. I do not think this is correct behavior.
I'm not sure of the appropriate fix at this time, since I'm not intimately familiar with ruby-debug's codebase. But it seems like if DebugEventHook were modified to contain per-thread data rather than shared data, it shouldn't need to synchronize.
Anyone out there want to help me fix and resolve this?
I've been trying to build the JRuby version ruby-debug-base
which JRuby 9.1.2.0 and it fails with:
src/org/jruby/debug/Context.java:409: error: cannot find symbol
int count = scope.getRequiredArgs() + scope.getOptionalArgs();
^
symbol: method getRequiredArgs()
location: variable scope of type StaticScope
src/org/jruby/debug/Context.java:409: error: cannot find symbol
int count = scope.getRequiredArgs() + scope.getOptionalArgs();
^
symbol: method getOptionalArgs()
location: variable scope of type StaticScope
src/org/jruby/debug/Context.java:410: error: cannot find symbol
if (scope.getRestArg() >= 0) {
^
symbol: method getRestArg()
location: variable scope of type StaticScope
src/org/jruby/debug/DebugEventHook.java:389: error: cannot find symbol
RubyArray args = runtime.newArray(tCtx.getCurrentScope().getArgValues());
^
symbol: method getArgValues()
location: class DynamicScope
I took a look at the DynamicScope
and StaticScope
classes and there doesn't seem to exist an obvious replacement for the functionality that was previously provided.
I vote for Pause functionality to be added to ruby-debug, whereby a keyboard shortcut can be used to pause running ruby code as if a breakpoint were added to the next line of execution.
> gem install ruby-debug --no-ri --no-rdoc
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: ruby-debug requires ruby-debug-base (~> 0.10.6.0)
> gem install ruby-debug-base -v '~> 0.10.6.0' --no-ri --no-rdoc
ERROR: Could not find a valid gem 'ruby-debug-base' (~> 0.10.6.0), here is why:
Found ruby-debug-base (0.10.6), but was for platform java
> uname -r
4.4.0-42-generic
> ruby -v
ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-linux]
> bundle -v
Bundler version 1.13.5
So I think the error is Found ruby-debug-base (0.10.6), but was for platform java
, but I'm not sure how to resolve this.
I'm attempting to debug my project's integration with the simplecov
gem. I have an Run Configuration that invokes a rake task. It will "Run" just fine, but when I attempt to execute the exact same configuration via "Debug", I see the following stack trace. Sure enough, Util.java
doesn't have a case statement to handle coverage
.
java.lang.IllegalArgumentException: unknown event type: coverage
at org.jruby.debug.Util.typeForEvent(Util.java:131)
at org.jruby.debug.DebugEventHook.eventHandler(DebugEventHook.java:97)
at org.jruby.runtime.EventHook.event(EventHook.java:30)
at org.jruby.Ruby.callEventHooks(Ruby.java:3121)
at org.jruby.runtime.ThreadContext.trace(ThreadContext.java:678)
at org.jruby.ir.interpreter.InterpreterEngine.processBookKeepingOp(InterpreterEngine.java:416)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:100)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
at org.jruby.Ruby.runInterpreter(Ruby.java:842)
at org.jruby.Ruby.loadFile(Ruby.java:2903)
at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:891)
at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:531)
at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:963)
at org.jruby.RubyKernel.require19(RubyKernel.java:956)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19_DBG.call(RubyKernel$INVOKER$s$1$0$require19_DBG.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:398)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
at org.jruby.Ruby.runInterpreter(Ruby.java:842)
at org.jruby.Ruby.loadFile(Ruby.java:2903)
at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:891)
at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:531)
at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:963)
at org.jruby.RubyKernel.require19(RubyKernel.java:956)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19_DBG.call(RubyKernel$INVOKER$s$1$0$require19_DBG.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:398)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:186)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:173)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
at org.jruby.Ruby.runInterpreter(Ruby.java:842)
at org.jruby.Ruby.loadFile(Ruby.java:2903)
at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:891)
at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:531)
at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:963)
at org.jruby.RubyKernel.require19(RubyKernel.java:956)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19_DBG.call(RubyKernel$INVOKER$s$1$0$require19_DBG.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:398)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
at org.jruby.Ruby.runInterpreter(Ruby.java:842)
at org.jruby.Ruby.loadFile(Ruby.java:2903)
at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
at org.jruby.runtime.load.LoadService.load(LoadService.java:343)
at org.jruby.RubyKernel.loadCommon(RubyKernel.java:982)
at org.jruby.RubyKernel.load19(RubyKernel.java:974)
at org.jruby.RubyKernel$INVOKER$s$0$1$load19_DBG.call(RubyKernel$INVOKER$s$0$1$load19_DBG.gen)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:202)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:186)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:173)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:150)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:137)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:127)
at org.jruby.runtime.InterpretedIRBlockBody.commonYieldPath(InterpretedIRBlockBody.java:141)
at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:84)
at org.jruby.runtime.Block.yieldSpecific(Block.java:134)
at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:421)
at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:74)
at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:112)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:91)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:278)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:79)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:84)
at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:429)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:150)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:137)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:127)
at org.jruby.runtime.InterpretedIRBlockBody.commonYieldPath(InterpretedIRBlockBody.java:141)
at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:84)
at org.jruby.runtime.Block.yieldSpecific(Block.java:134)
at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:421)
at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:74)
at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:112)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:91)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:278)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:79)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:84)
at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:429)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:112)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:91)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:278)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:79)
at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:432)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:90)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:222)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:209)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:338)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:183)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:324)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
at org.jruby.Ruby.runInterpreter(Ruby.java:842)
at org.jruby.Ruby.loadFile(Ruby.java:2903)
at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:891)
at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:531)
at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:963)
at org.jruby.RubyKernel.require19(RubyKernel.java:956)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19_DBG.call(RubyKernel$INVOKER$s$1$0$require19_DBG.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:398)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
at org.jruby.Ruby.runInterpreter(Ruby.java:842)
at org.jruby.Ruby.loadFile(Ruby.java:2903)
at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
at org.jruby.runtime.load.LoadService.load(LoadService.java:343)
at org.jruby.debug.Debugger.load(Debugger.java:148)
at org.jruby.debug.RubyDebugger.debug_load(RubyDebugger.java:209)
at org.jruby.debug.RubyDebugger$INVOKER$s$0$2$debug_load_DBG.call(RubyDebugger$INVOKER$s$0$2$debug_load_DBG.gen)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:278)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:79)
at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:432)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:186)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:173)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
at org.jruby.Ruby.runInterpreter(Ruby.java:842)
at org.jruby.Ruby.loadFile(Ruby.java:2903)
at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
at org.jruby.runtime.load.LoadService.load(LoadService.java:343)
at org.jruby.RubyKernel.loadCommon(RubyKernel.java:982)
at org.jruby.RubyKernel.load19(RubyKernel.java:974)
at org.jruby.RubyKernel$INVOKER$s$0$1$load19_DBG.call(RubyKernel$INVOKER$s$0$1$load19_DBG.gen)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:202)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
at org.jruby.Ruby.runInterpreter(Ruby.java:847)
at org.jruby.Ruby.runInterpreter(Ruby.java:851)
at org.jruby.Ruby.runNormally(Ruby.java:754)
at org.jruby.Ruby.runNormally(Ruby.java:767)
at org.jruby.Ruby.runFromMain(Ruby.java:580)
at org.jruby.Main.doRunFromMain(Main.java:417)
at org.jruby.Main.internalRun(Main.java:305)
at org.jruby.Main.run(Main.java:232)
at org.jruby.Main.main(Main.java:204)
I can't install ruby-debug for ruby 1.8.6
even thought the README
says I only need ruby 1.8.4
or higher.
The reason it won't even install? The dependency, via ruby-debug-base
, on linecache
(version ~> 0.46
). That version of linecache
requires ruby 1.8.7
or higher.
So, if there's no intent to continue supporting ruby 1.8.6
, then the README
should probably be updated to say that ruby 1.8.7
or above is required. Otherwise, some work obviously needs to be done for a 1.8.6
user to be able to use the current version of ruby-debug
.
Transferred from http://rubyforge.org/tracker/index.php?func=detail&aid=22176&group_id=3085&atid=11903
Compare debugging of the following snipped under MRI and under JRuby:
(1..10).each do |i|
puts i
end
Likely MRI behaves in the right way, i.e. debugger should not step into the block, until step-in is used, since 'each'
is still just method. Not sure whether fixable or not. Might be dependent on event emitted by JRuby interpreter.
1) Failure:
test_linetrace_command(TestTrace) [/Users/jfire/Development/ruby-debug/test/test-trace.rb:27]:
<false> is not true.
2) Failure:
test_linetrace_plus_command(TestTrace) [/Users/jfire/Development/ruby-debug/test/test-trace.rb:38]:
<false> is not true.
These both pass with linecache 0.43.
@rocky, have you seen this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.