Patches: Browse | Submit New | Admin

[#23301] allow for backtraces to show more vars, if desired

Date:
2008-12-21 03:20
Priority:
3
Submitted By:
Roger Pack (rogerdpack)
Assigned To:
Rocky Bernstein (rockyb)
Category:
None
State:
Open
Summary:
allow for backtraces to show more vars, if desired

Detailed description
This patch allows for the setting
set callstyle_vars true

and thusly outputs the local variables within a backtrace:
ex:


(rdb:1) bt
--> #0 Object.deem(a: 5)
        {"a"=>5} at line catch_me.rb:15
    #1 Object.deemy(a: 4)
        {"a"=>5} at line catch_me.rb:19
    #2 at line catch_me.rb:30

[those a's are local variables]
This allows users to quickly view the state of variables up the call stack.

The thing I wish I could somehow get would be the ability to do view the variables passed in post-mortem, this almost
gets there, and seems useful.
Thanks again for putting up with me.
=-r

Add A Comment: Notepad

Please login


Followup

Message
Date: 2010-10-14 14:27
Sender: Rocky Bernstein

I've been thinking about this a little more. In the newer
"trepanning" debuggers, we have a way to make sure
that output is bounded while given programmers a way to specify
the bound and a way to see everything.

Also, the reference debugger for rubinius has "verbose"
option to backtrace which indicates showing local variables.
Given this, I can see adding the feature after heavily modifying
this patch.

However the next release 0.10.4 will only be a bug-fix release.
Date: 2010-04-18 05:34
Sender: Rocky Bernstein

A similar concern here as with showing values on a backtrace:
the information should can be almost unbounded.

If you want locals value, it doesn't seem that cumbersome to
issue the command "info var locals" does it?

In the rewrite this is (or will be) a way that you can customize
commands. So if you really feel want to pursue this we can take
it up in rbdbgr.

Attached Files:

Name Description Download
callstyle_vars Download

Changes:

Field Old Value Date By
resolution_idNone2010-10-14 14:27rockyb
assigned_tonone2010-10-14 14:27rockyb
File Added4239: callstyle_vars2008-12-21 03:20rogerdpack