Perl Forum for Beginners

Debugging code that freezes

Mar 6, 2008 7:13 am
Joseph L. Casale

In another list, I am baffled by the instability of a Perl script that free=
zes after some time for a user. What can be done to run a Perl script in a =
debug like mode such that all system calls could be logged so that one coul=
d see what was attempted for execution by the script as it hung?

Thanks!
jlc

Mar 6, 2008 12:26 pm
Peter Scott
Re: debugging code that freezes

On Thu, 06 Mar 2008 00:13:02 -0700, Joseph L. Casale wrote:
> In another list, I am baffled by the instability of a Perl script that
> freezes after some time for a user. What can be done to run a Perl
> script in a debug like mode such that all system calls could be logged so that
> one could see what was attempted for execution by the script as it hung?

Try http://search.cpan.org/~mjd/Devel-Trace-0.10/Trace.pm ,



Previous Thread: Substr help
Next Thread: Making variables private

Related Forum Topics
Re: Debugging and tests
On Wed, Jul 8, 2009 at 09:31, Steve Bertrand<steve@ibctech.ca> wrote:
snip
> my %newhash = map { $_ =~ s/h_/hello_/; ($_, $hash{$_}) } keys %hash;
snip

That will still have a problem: $_ is changed, so it won't reference
the correct thing in %hash. Try this instead:

my %newhash = map {...
Re: Debugging and tests
> On Wed, Jul 8, 2009 at 10:16, Steve Bertrand<steve@ibctech.ca> wrote:

>> %hash = map { my $x = $_; $_ =~ s/h_/hello_/;$_, $hash{$x} } keys %hash;
> snip
>
> The following bits of advice are stylistic in nature, so you can
> ignore them, but there really are good reasons not to.
>
> As...
MIME::Lite debugging
I am trying to modify an existing script that uses MIME::Lite->send

I am trying to take any debug output and send it through a Debug
function which goes to a log file so I can see if there is an error.
Am I doing this correctly?:

I'm not using die because I think that sends it to stdout. ...
How to complete the loop while debugging.
--001636457c405003090478943878
Content-Type: text/plain; charset=UTF-8

Hi All,

It happens so many times that while debugging I come inside a loop which
doesn't contain the issue which I am debugging.

And as I am not aware of a method to complete the loop while debugging - I
manually...
Debugging a PERL Web Application
--001636283e78d46d7c0497c97d3a
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I have started working with Perl since 3 days.
I would like to debug an existing perl-web application and have already
found a few links on how to use eclipse and EPIC.
Here I am stuck though and I hope...
File::Find with chmod trouble debugging

The script below is my first usage of perls `chmod', but it appears to
be in keeping with the info at perldoc -f chmod.

But somehow in the print of $mode it turns into 493... even though it
is set to 755. Its just the print though... the actual chmod appears
to be working as...
32 bitx Hex point code to 24 bit (8-8-8) point code


Hello,

I am trying to convert 32 bitx Hex point code to 24 bit (8-8-8) point code. i tried to use below script from net, but due to limited understanding of perl and above script, I was not able to resolve my problem.

Can someone please help me resolve my issue?

thank...