Inspect variables in IronRuby scope

74 Views Asked by At

I want browse (and inspect) scope variables of ironruby scope.

If i execute:

a = 15
b = 16
c = a * b

I want to enumerate "a, b, c" and get their value on demand.

I tried runtime.Globals.GetVariableNames() and runtime.Globals.GetItems() but both returns empty enumerator.

1

There are 1 best solutions below

0
TcKs On

It's imposible to get the list of variables without reflection (see the picture below). However ruby have way, how to list variables themself ( Get all local variables or available methods from irb? ).

The selected row is variable created by ruby script. QuickWatch

P.S.: I'll let question still unanswered, for someone who will have better solution.