This article was migrated from http://rails.office.drecom.jp/takiuchi/archive/65

Railsコア(RailTies)に対する./script/breakpointer機能拡張パッチが採用されました。

これによって、ブレークポイント到達時にこんな事ができるようになります。
   1  irb(#<topcontroller:0x40822a68>):002:0> show_source_list
   2  0001  class TopController < ApplicationController
   3  0002    def show
   4  0003->    breakpoint
   5  0004    end
   6  0005    
   7  0006    def index
   8  0007    end
   9  0008    
  10  => "/path/to/rails/root/app/controllers/top_controller.rb"
  11  irb(#</topcontroller:0x40822a68><topcontroller:0x40822a68>):004:0> show_call_stack 3
  12  vendor/rails/railties/lib/breakpoint.rb:536:in `breakpoint'
  13  vendor/rails/railties/lib/breakpoint.rb:536:in `breakpoint'
  14  app/controllers/top_controller.rb:3:in `show'
  15  => "/path/to/rails/root/app/controllers/top_controller.rb:3"
  16  </topcontroller:0x40822a68>

ブレークポイント周辺のソースリストの表示と、コールスタックの表示です。 show_source_listの方は、引数に行数を指定する事で、表示するソースリストの 範囲を変えることができます。

あとはステップ実行ができるようになれば、普通のデバッガど同等の事ができるようになりそうですね。

This article was migrated from http://rails.office.drecom.jp/takiuchi/archive/65

posted by Png genki on Mon 10 Jul 2006 at 01:10
Contents
./script/breakpointer機能拡張パッチが採用されました
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
瀧内元気: おお、チェックしてみます。thx! '11-12
overisland: Reeder for iPhone もこの UI を実装していますね。 '11-12
瀧内元気: その情報は見たのですが、以下のサイトによると、現在はまた必要になってるっぽいんですよね。 ... '11-12
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ