SapphireSteel Forum
Welcome, Guest. Please login or register.
May 18, 2013, 04:00:53 PM

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
3883 Posts in 799 Topics by 669 Members
Latest Member: m
* Home Help Search Login Register
+  SapphireSteel Forum
|-+  General
| |-+  Ruby In Steel
| | |-+  RIS 1.x : breakpoint interferes with console interaction
« previous next »
Pages: [1] Print
Author Topic: RIS 1.x : breakpoint interferes with console interaction  (Read 2183 times)
amiracam
Jr. Member
**
Posts: 69


« on: May 03, 2011, 08:24:42 AM »

Please see here:

http://screencast.com/t/uGGkgg4vLN2

I'm simply trying to step thru the code in the book of ruby ch13, copy_files.rb

I've put a breakpoint right after a puts and a subsequent gets , however when I start with debugging it seems to bypass the puts and gets i.e. I am not prompted. The code btw , runs fine outside of the debugger i..e. start without debugging

tia
Logged
amiracam
Jr. Member
**
Posts: 69


« Reply #1 on: May 03, 2011, 08:31:46 AM »

to further clarify , the step into and step over menu items are disabled once I enter "start debugging"
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 933



« Reply #2 on: May 03, 2011, 09:58:42 AM »

It sounds like there may be an argument which is being read in by gets() (so it won't stop to read from the  prompt - this is an odd curiosity of gets).

When stopped at the breakpoint, hover over the sourcedir variable (or use the Watch window). What is its value?

You may also try repeating the gets line - i.e.

Code:
sourcedir = gets().chomp()
sourcedir = gets().chomp()

If it has read a commandline arg the first time it should stop for more input the second time. If that's the case the next thing to do is work out why you have extra args. You may want to check the Project properties to see if there is anything set there.

Huw
Logged
amiracam
Jr. Member
**
Posts: 69


« Reply #3 on: May 03, 2011, 10:38:15 AM »

see here for sourceDir value:

http://screencast.com/t/u1jFPnIe2dEz

basically it looks unset
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 933



« Reply #4 on: May 03, 2011, 10:40:06 AM »

Your breakpoint is not being hit. Are you using one of the ruby interpreters that Cylon supports for debugging?
Logged
amiracam
Jr. Member
**
Posts: 69


« Reply #5 on: May 03, 2011, 10:45:30 AM »

1.86 ? i.e. rubyinstaller-1.8.6-p398.exe , I thought that was ok with Ris 1.x, I'll go check out your spec sheet again
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 933



« Reply #6 on: May 03, 2011, 11:14:23 AM »

You need to use one of the versions linked here:

http://www.sapphiresteel.com/Products/Ruby-In-Steel/article/ruby-in-steel-prerequisites

Even if it has the same number, if it's been recompiled with a different C interpreter it will not work.
Logged
amiracam
Jr. Member
**
Posts: 69


« Reply #7 on: May 03, 2011, 11:28:18 AM »

sigh ... I miss Smalltalk Smiley, yes indeed that version does work, thanks much
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 933



« Reply #8 on: May 03, 2011, 11:34:48 AM »

I'm afraid you won't rediscover Smalltalk in Ruby. Smalltalk was a one-off. Its influence has spread wide but its elegance has not  Sad
Logged
amiracam
Jr. Member
**
Posts: 69


« Reply #9 on: May 03, 2011, 11:47:11 AM »

I think I'm sort of passed the language thing, sure its not Smalltalk there either in elegance nor ease, but I guess my biggest issues are still how the IDE's work. So far you all are the most promising. RubyMine for example is such a cow. Hope you all keep it up. In particular if you could do message highlighting in the debugger that would be huge, partial evaluation of code would be great too i.e. within the debugger. I already mentioned that I think its a defect not to provide at least static level senders and implementors, one should be able to just double click on a method token and ask where its being referenced and implemented. Huge productivity gains.

thanks
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1005


« Reply #10 on: May 15, 2011, 01:48:54 PM »

We thought about 'Find all references' for Ruby, but decided that it wasn't really worth it. To do it effectively, you really do need to know what everything is and where it is referenced. It's very difficult (impossible, I'd say) to do this for Ruby. You're probably better off just doing a search or a grep. The one place you really want to do this is Rails, but there's so much meta-programming in there that it makes a real 'Find All References' meaningless, really.

Doing it isn't a problem (we've done it for ActionScript in Amethyst - and it's accurate) - but the information just isn't there in Ruby to give a good enough coverage.

Dermot
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!