Support for IronRuby in SharpDevelop has moved on since the
last alpha release of the IronRuby addin. This addin now ships
with SharpDevelop 3.2 which is available to download from the
server. The main new features are support for IronRuby 1.0 RC 1
and the ability to debug IronRuby applications.
- Windows Forms designer support now complete
- Converting entire C# and VB.NET projects to IronRuby.
- Debugger support for IronRuby applications.
- Smart indenting for IronRuby code.
- IronRuby 1.0 RC 1 support.
Currently there is no support for IronRuby code completion.
Now we will take a look at some of the new features in more
Running an IronRuby Application
After you create an IronRuby application you can run it
immediately without having to edit the project options as you did
previously. The project templates have been updated so that
everything is ready to go straight away. Simply select Run
from the Debug menu to run your application with the
Debugging an IronRuby Application
In order to get the debugger to work well when debugging an
IronRuby application you should change the debugger options. To
open the debugger options select Options from the
Tools menu, then select the Debugging category. Only
the 'Just My Code' feature should be selected and
everything else should be unselected, as shown in the screenshot
You can set your breakpoints in the normal way either by
clicking in the left hand margin of the text editor or by selecting
Toggle Breakpoint from the Debug menu.
Selecting Run from the Debug menu will run your
IronRuby application under the debugger. Alternatively you can
select Run from the Ruby menu which will run the code
currently active text editor window. Selecting either of these will
run the IronRuby console in debug mode with SharpDevelop's
Converting a C# or VB.NET Project to IronRuby
To convert a VB.NET or C# project to IronRuby open the project
and then select Convert from C# to Ruby or Convert from
VB.NET to Ruby from the Project menu.
Extra Ruby Libraries
IronRuby 1.0 RC 1 download from
codeplex includes extra
Ruby libraries that are not shipping with SharpDevelop. If you want
to use these libraries then download the IronRuby zip file and copy
the lib folder to the IronRuby addin folder:
The IronRuby console (ir.exe) is configured to look in the
lib subfolder by information in the ir.exe.config file:
<set language='Ruby' option='LibraryPaths' value='lib\IronRuby;lib\Ruby\site_ruby\1.8;lib\Ruby\site_ruby;lib\Ruby\1.8'/>
If you want to put these Ruby libraries somewhere else then the
ir.exe.config file should be modified.
IronRuby 1.0 RC 1 from Codeplex