# Re: Backtrace supported?

**URL:** <https://www.ruby-forum.com/t/re-backtrace-supported/149727>\
**Category:** IronRuby\
**Created:** [September 29, 2008, 3:51am UTC](https://www.ruby-forum.com/t/re-backtrace-supported/149727 "2008-09-29T03:51:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [September 29, 2008, 3:51am UTC](https://www.ruby-forum.com/t/re-backtrace-supported/149727/1 "2008-09-29T03:51:26Z")

</div>

Yeah, they are a work in progress. Backtrace is probably hard to spec  
because it may differ implementation to implementation.

JD

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [September 29, 2008, 4:48am UTC](https://www.ruby-forum.com/t/re-backtrace-supported/149727/2 "2008-09-29T04:48:08Z")

</div>

Could you sent the script where you see the behavior? What parameters do  
you pass on command line?

I tried this and it works:

a.rb:

def foo  
bar  
end

def bar  
raise  
end

begin  
foo  
rescue  
p $!  
puts $!.backtrace  
end

C:\Temp\>ir -D a.rb  
#\<RuntimeError: RuntimeError\>  
a.rb:6:in `bar' a.rb:2:in`foo’  
a.rb:10

Tomas

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [September 29, 2008, 11:53am UTC](https://www.ruby-forum.com/t/re-backtrace-supported/149727/3 "2008-09-29T11:53:13Z")

</div>

Sure, i’ll zip up the code and send it over to you.

Ben

On Mon, Sep 29, 2008 at 3:47 AM, Tomas M.

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [September 29, 2008, 3:04pm UTC](https://www.ruby-forum.com/t/re-backtrace-supported/149727/4 "2008-09-29T15:04:18Z")

</div>

Are you running IronRuby in compilation or interpret mode? I have a  
feeling  
that the stack tracing might not work right in interpret mode. Is that  
right Tomas?

RubySpecs are definitely a work in progress and anything you can do to  
help  
push them along would be warmly welcomed, in my experience!

By the way, be careful running rake mspec:… By default it runs under  
ci  
mode which doesn’t run specs that have a fail tag. See ironruby-tags  
project that you should have got from Git. (ci stands for continuous  
integration and is designed to catch regression bugs)  
Try running with run as the runner. I.E. rake mspec:core Exception -  
run.  
This will also run those tagged specs and give a much better idea of  
what is  
implemented/working in IronRuby. Of course if the specs are empty then  
this  
won’t make any difference.

Pete

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [September 29, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/re-backtrace-supported/149727/5 "2008-09-29T18:14:35Z")

</div>

I implemented some basic support last week, so you will get some traces

- it’s not finished yet though, so you might also get some failed  
assertions or imprecise traces.

Tomas
