Skip to content
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

"next" performs a "step" in jruby #19

Open
gregors opened this issue Jan 31, 2013 · 12 comments
Open

"next" performs a "step" in jruby #19

gregors opened this issue Jan 31, 2013 · 12 comments

Comments

@gregors
Copy link

gregors commented Jan 31, 2013

"next" performs a "step" in jruby. Anyone have any pointers on how I might begin to tackle this?

@simonx1
Copy link

simonx1 commented May 2, 2013

I have the same - no difference between "next" and "step".
Checked on JRuby 1.7.3

@jonathanpa
Copy link

Same for me with JRuby 1.7.x.

@camertron
Copy link

Had the same issue. Pass the --debug option to jruby to fix.

@jonathanpa
Copy link

@camertron , could you give more details about how you are using the --debug option ? I followed the wiki page UsingTheJRubyDebugger and tried different things and combinations without success on a Rails project. Thanks.

@camertron
Copy link

Hey @jonathanpa, I'm not using pry-nav in a Rails project, maybe that's the difference? I'm running a plain ruby (jruby) command - it looks something like this in its entirety:

JRUBY_OPTS="-J-XX:MaxPermSize=128m..." CLASSPATH=vendor/scala-compiler-2.9.2.jar:... /usr/bin/env ruby --debug --1.9 my_script.rb

Note that I've used ellipses to indicate more parameters (those aren't actually part of the command). This seems to work for me - both "next" and "step" do what they're supposed to do. For Rails, I think it's just a matter of finding where ruby itself is invoked. Maybe try patching the shebang at the top of your script/rails file:

#!/usr/bin/env ruby --debug

@delwaterman
Copy link

I just tried this using bundler for a non-rails project. I modified the bundler bin to:

#!/usr/bin/env jruby --debug
#
# This file was generated by RubyGems.
#
# The application 'bundler' is installed as part of a gem, and
# this file is here to facilitate running it.
#

I have the same issue

@camertron
Copy link

Hmm this suddenly stopped working for me... I guess I'm in the same boat as you guys :(

@wdiechmann
Copy link

I'm not sure whether you guys are cool with me linking to this issue – but I did experience the next/step malaise and using/switching to pry-byebug did not squelch it

@AndrewLngdn
Copy link

Did anyone find a solution to this problem? I'm still seeing the problem even with the --debug flags

Edit: I needed to use two --debug flags, like this:
jruby --debug -S rspec --debug spec/controllers/users_controller_spec.rb

Sorry about bumping an old thread, still getting used to jruby

@JESii
Copy link

JESii commented Feb 6, 2015

FYI:
jruby 1.7.12 (1.9.3p392), java 1.7.0_5, and
JRUBY_OPTS = "-Xcext.enabled=true --debug" works for me.
thanks!

@camertron
Copy link

OMG @JESii that totally worked, thank you so much for sharing! I thought we were never going to get a solution for this, so I just made my peace with it and moved on. Really nice to finally be able to do a proper next. It's the little things...

@RalphShnelvar
Copy link

I cannot get JESii's solution to work.

My environment:
jruby 9.0.0.0 (2.2.2) 2015-07-21 e10ec96 Java HotSpot(TM) 64-Bit Server VM 25.74-b02 on 1.8.0_74-b02 +jit [Windows 7-amd64]

Rails 4.1.8

Is there a debugger out there that will actually work in the environment I have?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants