perl -d file.pl
- ブレークポイント文は
$DB::single = 1
Command | Action |
---|---|
n | Next. |
s | Step in. |
o | step Out. |
c | Continue. |
r | Returnまで進める |
Command | Action |
---|---|
T | show back-Trace. |
y | 現在のスコープの変数を表示 |
x | eXpr |
p | |
l | 一画面分表示。押すたびに次へ |
- | 一画面分前を表示。押すたびに前へ |
v | 付近を表示。押すたびに次へ |
. | 現在の行を表示。 |
-
ruby 1.9.3
-
gem install debugger
-
require 'debugger'
-
ブレークポイント文は
debugger
-
起動は
ruby file.rb
のみでOK -
ブレークポイント文が不要なら
ruby -r debug.rb file.rb
-
-
ruby2.1
gem install byebug
require 'byebug'
- ブレークポイント文は
debugger
- 起動は
ruby file.rb
のみでOK
` ``
Command | Action |
---|---|
n | Next. |
s | Step in. |
o | step Out. |
c | Continue. |
fin | Returnまで進める |
Command | Action |
---|---|
bt or where | show back-Trace. |
p | |
l | ソース表示。l 4,9 で4行目から9行目まで表示 |
v l | ローカル変数を表示 |
v g | グローバル変数を表示 |