Skip to content

Instantly share code, notes, and snippets.

@toritori0318
Created December 10, 2011 18:01
Show Gist options
  • Select an option

  • Save toritori0318/1455777 to your computer and use it in GitHub Desktop.

Select an option

Save toritori0318/1455777 to your computer and use it in GitHub Desktop.
perldb補足
# エイリアス設定したり
$DB::alias{'rerun'} = 'exec "perl -d $DB::filename"';
$DB::alias{'len'} = 's/^len(.*)/p length($1)/';
$DB::alias{'stop'} = 's/^stop (at|in)/b/';
# トレース情報をdb.outに保存
parse_options("LineInfo=db.out AutoTrace");
# デバッガの初期化終了後に呼び出されるサブルーチン
sub afterinit {
### 外部からブレークポイントをコントロール
# サブルーチンに対してブレークポイント設定とか(モジュールがロードされている必要あり)
push @DB::typeahead, "b MyModue::Hoge::new";
# 特定のモジュールがロードされたらブレークするとか
push @DB::typeahead, "b load MyModule::Fuga";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment