I'm trying to debug an external dsl and i have found some problems to
step in the code (at least under windows)

I have a main.rb file (file are attached in test_debug.7z) :
puts "In Main before eval"
instance_eval(File.read("dyn.dsl"),"dyn.dsl")
puts "In Main after eval"

and a dyn.dsl file :
puts "In dyn line 1"
x = 1 + 1
puts "x = #{x}"

Using Rubymine2.0 with ruby-debug-ide 0.4.9 correctly compiled (it was
quite hard to get there by the way...), the debugger is able to set a
breakpoint correctly on file "dyn.dsl". I'm able to step in this file.
Everything is ok.

Now, if i try to debug it from the comman line : [ruby -r debug
main.rb], i'm not able to see the source file of dyn.dsl code :
E:\Code\RubyTest>ruby -r debug main.rb
Debug.rb
Emacs support available.

main.rb:1:puts "In Main before eval"
(rdb:1) break dyn.dsl:1
Set breakpoint 1 at dyn.dsl:1
(rdb:1) cont
In Main before eval
Breakpoint 1, toplevel at dyn.dsl:1
dyn.dsl:1:
(rdb:1) list
[-4, 5] in dyn.dsl
No sourcefile available for dyn.dsl

Ruby version is : ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

Worst is that with ruby 1.9.1, I'm no longer able to debug through
instance_eval on an IDE, at least tested Rubymine2.0 or Netbeans.

Do you have any explanations?

Attachments:
http://www.ruby-forum.com/attachment/4271/test_debug.7z

-- 
Posted via http://www.ruby-forum.com/.