diff options
-rw-r--r-- | lib/perl5db.pl | 4 | ||||
-rw-r--r-- | lib/perl5db.t | 28 |
2 files changed, 29 insertions, 3 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 54cabdc72e..dee4ebe0c6 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -914,8 +914,8 @@ $inhibit_exit = $option{PrintRet} = 1; use vars qw($trace_to_depth); -# Default to 1 so the prompt will display the first line. -$trace_to_depth = 1; +# Default to 1E9 so it won't be limited to a certain recursion depth. +$trace_to_depth = 1E9; =head1 OPTION PROCESSING diff --git a/lib/perl5db.t b/lib/perl5db.t index 631635ea70..08f513abbb 100644 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -28,7 +28,7 @@ BEGIN { } } -plan(95); +plan(96); my $rc_filename = '.perldb'; @@ -2275,6 +2275,32 @@ sub _calc_trace_wrapper ); } +# Test the o AutoTrace command with function calls +{ + my $wrapper = DebugWrap->new( + { + cmds => + [ + 'o AutoTrace', + 'b 18', + 'c', + 'x ["foo"]', + 'x ["bar"]', + 'q', + ], + prog => '../lib/perl5db/t/test-warnLevel-option-1', + } + ); + + $wrapper->contents_like(qr/ + ^main::\([^:]+:28\):\n + 28:\s+myfunc\(\);\n + main::myfunc\([^:]+:25\):\n + 25:\s+bar\(\);\n + /msx, + 'Test the t command with function calls.', + ); +} END { 1 while unlink ($rc_filename, $out_fn); } |