SapphireSteel Forum
Welcome,
Guest
. Please
login
or
register
.
May 23, 2013, 04:03:47 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Welcome to the SapphireSteel forum - for discussion of the Ruby In Steel and Amethyst IDEs
3884
Posts in
800
Topics by
669
Members
Latest Member:
m
SapphireSteel Forum
General
Ruby In Steel
adding a watch expression
« previous
next »
Pages:
[
1
]
Author
Topic: adding a watch expression (Read 2231 times)
amiracam
Jr. Member
Posts: 69
adding a watch expression
«
on:
May 16, 2011, 03:03:21 PM »
HI, today I noticed one can add a "watch" expression , something which I was doing during a live debug session, which it thought pretty cool , well for Ruby circles, but some expressions I could add and some I could not. So I wonder what the rules are or is it also that some expressions you can not add during a live debug session.
To be clear I was in a debug session and I highlighted , popped mouse and clicked on "add watch" e.g.
File.directory?(mypath) false False
which is fine
but:
processfiles(mypath) undefined local variable or method
is not fine
note that both rely on the mypath local scope var
now, not a biggie problem per se, I can live with trial and error for a bit, however I am curious as to what the tools underlying rules are in this situation.
thanks
Logged
Huw Collingbourne
Administrator
Hero Member
Posts: 934
Re: adding a watch expression
«
Reply #1 on:
May 16, 2011, 03:56:53 PM »
Which version of Ruby In Steel is this (1 or 2 and, if the latter, beta 1 or beta 2)?
Huw
Logged
amiracam
Jr. Member
Posts: 69
Re: adding a watch expression
«
Reply #2 on:
May 18, 2011, 11:59:51 AM »
Ris 2 beta 2
ruby 1.92
same as I was using for Ris 2 beta 1
Logged
Dermot
Administrator
Hero Member
Posts: 1005
Re: adding a watch expression
«
Reply #3 on:
May 22, 2011, 06:54:26 AM »
There's no special rules for the watch window. The debugger just uses Ruby to 'eval' the expression in the stack frame where the debugger is halted. If Ruby can successfully evaluate the expression, the result is displayed. If not an error message is given. So it's down to the interpreter, really.
There are some very tricky problems to deal with concerning Ruby 'inspectors' (these are user written routines return the result for more complicated types), but probably won't come across these in simple examples.
Dermot
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> News and Announcements
=> Amethyst
=> Ruby In Steel
=> Ruby Programming
=> The Snug Bar