trace of method calls

A

avilella

Hi,

I would like to trace all the method calls for a script. What is the
best module people would recommend for this?

Cheers,

Albert.
 
S

Spiros Denaxas

Hi,

I would like to trace all the method calls for a script. What is the
best module people would recommend for this?

Cheers,

Albert.

Hi Albert,

I would use the Perl debugger for this.

perl -d script.pl

tracing is available with 'T' and it toggled with 't'.

Run 'perldoc perldebtut' for more info.

Addionally, I believe the Perl profiler has a similar output support.
Have a look at:

http://search.cpan.org/~nwclark/perl-5.8.6/utils/dprofpp.PL
and
http://search.cpan.org/perldoc?Devel::DProf

hope this helps,
Spiros
 
A

avilella

Dynamically, or statically?

BugBear

I think what I want is statically. I can use breakpoints and "T", but
I rather want to run the script completely and then have a debug file
with all the method calls.
 
S

Spiros Denaxas

oh, ok, dynamic then :)

Anyone?

Hi,

then use the Perl profiler and analyze its output with dprofpp.

from the manpage:

-T Display subroutine call tree to stdout. Subroutine
statistics are
not displayed.

-t Display subroutine call tree to stdout. Subroutine
statistics are
not displayed. When a function is called multiple
consecutive
times at the same calling level then it is displayed once
with a
repeat count.

Hope this helps,

Spiros
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top