# Ruby-debug: 1) @-sign, 2) v i \<object\>

**URL:** <https://www.ruby-forum.com/t/ruby-debug-1-sign-2-v-i-object/112103>\
**Category:** Ruby\
**Created:** [August 15, 2007, 1:37pm UTC](https://www.ruby-forum.com/t/ruby-debug-1-sign-2-v-i-object/112103 "2007-08-15T13:37:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![axel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@axel](https://www.ruby-forum.com/u/axel)\
**Post date:** [August 15, 2007, 1:37pm UTC](https://www.ruby-forum.com/t/ruby-debug-1-sign-2-v-i-object/112103/1 "2007-08-15T13:37:17Z")

</div>

Hello,

when using ruby-debug ( _not_ the standard debugger coming with Ruby),  
I cannot get the @-sign typed. Is there a way to get it typed?

I’m using:

- a German keyboard
- Windows XP pro
- ruby-debug 0.9.3 (running it from cmd)
- ruby 1.8.4 (2005-12-24) [i386-mswin32]

When switching Windows to US-keyboard, @-sign works, but I have big  
difficulties getting for exampel those brackets [] . (Additionaly, I  
would be very slow in typing on it…)

Another thing, how does:

v[ar] i[nstance]

work? - When using the exampel of Brian Donovan, slightly modified:

```
class My
  def fib(n)
    @fib_cache ||= [1, 1]
    @fib_cache[n] ||= fib(n-1) + fib(n-2)
  end
end

my = My.new
puts my.fib(20)

```

and set a breakpoint, continue and enter “v i My”, I do not get  
anything. .

Thank you!

Axel

---

<div class="post-metadata">

**Author:** ![axel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@axel](https://www.ruby-forum.com/u/axel)\
**Post date:** [August 15, 2007, 2:10pm UTC](https://www.ruby-forum.com/t/ruby-debug-1-sign-2-v-i-object/112103/2 "2007-08-15T14:10:23Z")

</div>

Axel wrote:

> ```
> end
> end
> 
> my = My.new
> puts my.fib(20)
> 
> ```
> 
> and set a breakpoint, continue and enter “v i My”, I do not get  
> anything.

"v i " list instance variables of the

E.g. try to add one line at the end of you program, e.g. sleep 0.1, and  
put breakpoint on it. Then you get the array of fibonacci numbers  
@fib\_cache listed after “v i my”.

"v i " uses object.instance\_variables and there are not any on  
My class, so you got nothing after “v i My”

m.

---

<div class="post-metadata">

**Author:** ![axel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@axel](https://www.ruby-forum.com/u/axel)\
**Post date:** [August 15, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/ruby-debug-1-sign-2-v-i-object/112103/3 "2007-08-15T14:26:26Z")

</div>

Hello Martin,

> E.g. try to add one line at the end of you program, e.g. sleep 0.1, and  
> put breakpoint on it. Then you get the array of fibonacci numbers  
> @fib\_cache listed after “v i my”.

Ahh, nice, this works! Thank you!

- Axel

---

<div class="post-metadata">

**Author:** ![axel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@axel](https://www.ruby-forum.com/u/axel)\
**Post date:** [August 15, 2007, 2:47pm UTC](https://www.ruby-forum.com/t/ruby-debug-1-sign-2-v-i-object/112103/4 "2007-08-15T14:47:27Z")

</div>

On 8/15/07, Axel [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> When switching Windows to US-keyboard, @-sign works, but I have big  
> difficulties getting for exampel those brackets [] . (Additionaly, I  
> would be very slow in typing on it…)

On Slovak keyboard, @ is typed by AltGr (the right Alt) with V. Try  
pressing the keys with AltGr to find it.

---

<div class="post-metadata">

**Author:** ![axel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@axel](https://www.ruby-forum.com/u/axel)\
**Post date:** [September 25, 2007, 11:03pm UTC](https://www.ruby-forum.com/t/ruby-debug-1-sign-2-v-i-object/112103/5 "2007-09-25T23:03:05Z")

</div>

Hello Jano,

> On Slovak keyboard, @ is typed by AltGr (the right Alt) with V. Try  
> pressing the keys with AltGr to find it.

unfortunately, this doesn’t work with ruby-debug, at least on my side.

With all other programs, for example notepad and cmd-shell, I get @  
by AltGr + Q on my German keyboard; but not with ruby-debug. ☹

Thank you,

Axel
