SapphireSteel Forum
Welcome, Guest. Please login or register.
May 23, 2013, 11:14:20 AM

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
* Home Help Search Login Register
+  SapphireSteel Forum
|-+  General
| |-+  Ruby In Steel
| | |-+  Debugging Question
« previous next »
Pages: [1] Print
Author Topic: Debugging Question  (Read 4726 times)
wiggumon
Newbie
*
Posts: 6


« on: March 01, 2010, 06:52:26 AM »

First let me start by saying how happy I was to find a Ruby IDE that used Visual Studio.  For the most part I development using C# but I am preparing for a Ruby on Rails project and finding Ruby in Steel was great.

I have been doing some testing with a basic Ruby application and I wanted to try the debugging system.  My setup is:

Windows - 7 x64
Visual Studio - 2008
Ruby in Steel - 1.5.826
Ruby - ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]
Rails - 2.3.5

I have admin rights to my laptop and when I run Visual Studio I run as an administrator.  Now on to the problem.  Using Ctrl-F5 to run my app works great.  When I attempt to debug by using F5 nothing happens.  I am setting a breakpoint but I am never hitting it.  After pressing F5 the IDE looks like it is entering debug mode and I have the option to stop dugging, but not to step over/into any source.  A Ruby console comes up with a blinking cursor and when I het ?enter? the following output appears and debugging stops.

C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:59:in `write': Invalid argument - \\.\pipe\RubyPipe4 (Errno::EINVAL)
   from C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:59:in `print'
   from C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:59:in `readline'
   from C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:107:in `command'
   from C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:376:in `trace_func'
   from C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:395
   from C:/Source/steel/FileParser/FileParser/rubyfile.rb:3
   from C:/Source/steel/FileParser/FileParser/rubyfile.rb:3

I have the Ruby lib directory in my path and I have double checked the project settings to make sure it is being used.  The IRB console works as well. The setup seems to be correct but debugging has yet to work.  Any assistance would be great.

Thanks,

Chris
« Last Edit: March 01, 2010, 08:06:54 AM by wiggumon » Logged
Dermot
Administrator
Hero Member
*****
Posts: 1005


« Reply #1 on: March 01, 2010, 11:42:21 AM »

Sorry about the delay in replying, but I thought I'd better check Windows7/x64 (not my normal O/S (yet): takes a little while to get everything started up and running).

You need to use Ruby 1.8.6 for the debugger to work. The debugger is very sensitive to the internal configuration of Ruby and will only work with 1.8.6. I'je just downloaded the recommended version fro the Ruby website and that works ok.

Few people seem to use 1.8.7 because it offers no perfomance advantages over 1.8.6 and has a number of compatibility problems.

Dermot
Logged
wiggumon
Newbie
*
Posts: 6


« Reply #2 on: March 01, 2010, 12:37:34 PM »

I uninstalled the 1.8.7 version of Ruby and installed:

ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]

I still can't seem to run with a debugger.  Is there anything else that I need to uninstall or reinstall?  Here is a list of the installed gems:

C:\Ruby\rubygems-1.3.6>gem list

*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
mysql (2.8.1)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
sqlite3-ruby (1.2.5)

Thanks.

Chris
« Last Edit: March 01, 2010, 12:46:07 PM by wiggumon » Logged
Dermot
Administrator
Hero Member
*****
Posts: 1005


« Reply #3 on: March 01, 2010, 04:00:26 PM »

You need to use the one from the Ruby download page for Windows.

I get this on a ruby -v command:

ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

It's important to use exactly that one and not one built by the ming compiler

The reason is that the debugger and the interpreter have to be very closely matched so that I can get the maximum speed for the debugger (we're 3 to 5 times faster than our nearest rival). I know that it's normally not considered to be good engineering practise to try things together so tightly, but to get the speed, I've had to do it this way. Of course, it doesn't make any difference what you use on a production web site, but I cant say I've noticed any difference in any of the 1.8.6 series in terms of speed.

This is the link I used:

http://rubyforge.org/frs/download.php/47082/ruby186-27_rc2.exe

so try downloading that and see if that fixes it

Dermot



Logged
wiggumon
Newbie
*
Posts: 6


« Reply #4 on: April 02, 2010, 05:44:03 AM »

Thank you for all the information.  It has been very helpful.  Do you know if\when the cylon debugger will support Ruby 1.8.7?  The project architect that I am working with has decided on 1.8.7.

Thanks,

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


« Reply #5 on: April 06, 2010, 02:30:42 AM »

I think all it really needs is relinking the debugger with 1.8.7 and some testing.

So we'll probably do it when we upgrade RiS to support VS2010 later on this year.

Dermot
Logged
Mark Bixby
Registered User
Newbie
*
Posts: 9


« Reply #6 on: July 27, 2010, 02:22:23 PM »

What's the current timeframe for Ruby 1.8.7 support? 

We recently migrated from OneClickInstaller 1.8.6-p287 to RubyInstaller 1.8.7-p249 because we have a need to do LDAP authentication and the net-ldap gem does not support 1.8.6.  We're using Win7 64-bit plus VS 2005 plus RIS 1.5.  When attempting to start debug mode with Cylon, nothing appears in the console subwindow.  If Cylon is disabled the app will start, but is unusably slow.  So the runtime symptoms are somewhat different than reported in this forum thread but ultimately "not supported" is still "not supported" ;-).

We have no burning desire to jump to Ruby 1.9 at the moment...but eventually that time will come.
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 934



« Reply #7 on: July 27, 2010, 03:49:28 PM »

We have no support of 1.8.7 with Cylon at present. We simply haven't hand many requests for that. The slow debugger may possibly support 1.8.7 if you disable the Cylon option. Otherwise, I'd recommend debugging with the supported version of 1.8.6. We may be able to do a 1.8.7 version if this proves to be a simple task (as Dermot mentioned above) but this is not a commitment.

best wishes

Huw
« Last Edit: July 27, 2010, 03:51:56 PM by Huw Collingbourne » Logged
igorfrance
Newbie
*
Posts: 3


« Reply #8 on: September 16, 2010, 03:19:59 AM »

What is the current status on Sapphire/Visual Studio/Ruby debugging support?

It appears that the Rails gem will not run with Ruby 1.8.6 at all. In order to get the Ruby-on-Steel debugging in Visual Studio, I have uninstalled my Ruby 1.9.1 and the corresponding Rails, and installed Ruby 1.8.6 as suggested earlier in this thread. When I subsequently try to install the Rails gem, it fails with a message saying that it will not run on 1.8.6. I have then even tried your all-in-one installer in hopes that the combination of components in there will help solve this problem, but ended up at the exact same point - the Rails gem will not install on 1.8.6 version of Ruby. So, I cannot even try the Ruby on Steel debugger (in the context of my Rails application). Please, advise.

Additionally, I am considering purchasing Ruby on Steel, if the debugging experience turns out to be a joy. What is the status of updating it to run under VS2010? When is that update planned to come out, and will that be a whole new version that needs to be bought separately, or will it be a free upgrade of the currently release version?

Thanks.
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 934



« Reply #9 on: September 16, 2010, 12:17:14 PM »

We've just tested a clean install with the all in one installer and it seems the standard rails install now tries to use Rails 3, hence the incompatibilities. Rails 3 requires a version of the Ruby compiler that isn't supported by the debugger.

To install Rails use (from the command line):

gem install rails --version=2.3.8

We hope to make an announcement relating to VS2010 later in the year. I'm afraid I can't say any more at this date, however.

best wishes

Huw

« Last Edit: September 19, 2010, 12:12:43 PM by Huw Collingbourne » Logged
igorfrance
Newbie
*
Posts: 3


« Reply #10 on: September 20, 2010, 12:15:47 AM »

OK, I am now on Ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] with Rails 2.3.8, and when I click the 'One-Click Rails Debugger' from the menu Visual Studio 2008 appears to be switching into debug mode within moments silently goes back to design mode. Fortunately, ruby on steel emits the command that was run in the output window, so I copied that and ran it manually in command prompt. This is the output it produces:

C:\Windows\SysWOW64\cmd.exe /C ""C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\debug.bat" "D:\dev\languages\ruby\bin\ruby.exe"  -I"C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger" -r"C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb" "C:\Program Files (x86)\SapphireSteel Software\Ruby
In Steel\v1.0\Scripts\webbrick_service.rb" -p3000"
C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:66:in `initialize': No such file or directory - \\.\pipe\RubyPipe4 (Errno::ENOENT)
        from C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:66:in `open'
        from C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:66:in `initialize'
        from C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:393:in `new'
        from C:\Program Files (x86)\SapphireSteel Software\Ruby In Steel\v1.0\Debugger\steelcylon.rb:393

Any ideas?
Logged
igorfrance
Newbie
*
Posts: 3


« Reply #11 on: September 20, 2010, 12:30:00 AM »

Ok, I figured it out, I still needed to run 'gem update --system' to upgrade RubyGems to version >= 1.3.2
Logged
willemderu
Registered User
Newbie
*
Posts: 12


« Reply #12 on: September 24, 2010, 03:28:26 AM »

Just to add my voice to those that says that it would be very much appreciated if the Ruby in Steel Cyclone debugger could work with Ruby 1.8.7 and higher as well. Many gems now require at least Ruby 1.8.7 so for many projects it is required to use Ruby 1.8.7 and one can not use Ruby 1.8.6 anymore.

Thanks!

Regards
Willem
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 934



« Reply #13 on: September 24, 2010, 07:51:34 AM »

We will make an announcement on this soon - probably within the next 7 to 10 days.  Smiley

best wishes

Huw
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!