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

list shows old code #5

Open
ryan2johnson9 opened this issue Oct 6, 2014 · 4 comments
Open

list shows old code #5

ryan2johnson9 opened this issue Oct 6, 2014 · 4 comments

Comments

@ryan2johnson9
Copy link

I'm using Rubinius 2.2.10 and Rubinus Debugger 2.0.3.
Debugging with Rubinius::Debugger.start, I type 'l' to list the code. Unfortunately the code is out of date as I just recently changed it. The debugger shows old code but the new code is being run.

@brixen
Copy link
Member

brixen commented Oct 6, 2014

Could you gist a repro of some sort? Something I can run to see what you are describing.

@ryan2johnson9
Copy link
Author

Here is a simple example, sorry but I do not know how to setup a fully working environment whereby this can easily be replicated by you but I hope the below gist demonstrates what I mean clearly. It was run in my console and I did use 'reload!' between edits, the same behaviour occurs on my app.

https://gist.github.com/ryan2johnson9/680f5f3877f839548aa1

@tak1n
Copy link
Member

tak1n commented May 24, 2015

@ryan2johnson9 on 2.5.5 I get following results for trying to reproduce:

rubinius-bugs ➤ pry -I. -rdebug_list                                                                                                                                                                   git:master*
[1] pry(main)> Tmp.new 'test'

| Breakpoint: Tmp#initialize(name) at /home/benny/Development/ruby/learn/rubinius-bugs/debug_list.rb:5 (7)
| 5:     Rubinius::Debugger.start
debug> l 3
| 1: require 'rubinius/debugger'
| 2: 
| 3: class Tmp < Object
| 4:   def initialize name
| 5:     Rubinius::Debugger.start
| 6:     puts "initializing Tmp object"
| 7:     @name = name
| 8:   end
debug> exit
rubinius-bugs ➤ vim debug_list.rb                                                                                                                                                                      git:master*
rubinius-bugs ➤ pry -I. -rdebug_list                                                                                                                                                                   git:master*
[1] pry(main)> Tmp.new 'test'

| Breakpoint: Tmp#initialize(name) at /home/benny/Development/ruby/learn/rubinius-bugs/debug_list.rb:5 (7)
| 5:     Rubinius::Debugger.start
debug> l 3
| 1: require 'rubinius/debugger'
| 2: 
| 3: class Tmp < Object
| 4:   def initialize name
| 5:     Rubinius::Debugger.start
| 6:     puts "initializing Tmp object edited"
| 7:     @name = name
| 8:   end
debug> 

As you can see for 2.5.5 everything works as expected.
Can you try to reproduce it for 2.5.5?

@ryan2johnson9
Copy link
Author

hmm - I've now got rbx-2.5.5 and rubinius-debugger-2.2.1 and following the same code I have the same issue - why would yours work and mine not?

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

3 participants