ibm1620 has asked for the wisdom of the Perl Monks concerning the following question:
When I run the debugger on any program from one particular directory, it does not stop at the first executable line, but runs to completion as if I'd given the 'c' debugger command to continue.
Here's my perl executable:The-Air:~/private/lewis_folder/client$ cat wjma.pl #!/usr/bin/env perl use warnings; use strict; print "HEY\n";
Demonstrating that the program works:The-Air:~/private/lewis_folder/client$ which perl /Users/chap/perl5/perlbrew/perls/perl-5.34.0/bin/perl
Demonstrating running debugger on program, from within the problem directory. Note that it automatically runs to completion.The-Air:~/private/lewis_folder/client$ ./wjma.pl HEY
Now I run the debugger on the same program while in a different directory. Note that it behaves correctly, stopping on the first statement.The-Air:~/private/lewis_folder/client$ perl -d wjma.pl Loading DB routines from perl5db.pl version 1.60 Editor support available. Enter h or 'h h' for help, or 'man perldebug' for more help. main::(wjma.pl:4): print "HEY\n"; DB<1> HEY The-Air:~/private/lewis_folder/client$
Now I run the debugger from the problem directory on the same program, located in a different directory. Note that again it runs to completion rather than stopping:The-Air:~$ /bin/pwd /Users/chap The-Air:~$ perl -d /Users/chap/private/lewis_folder/client/wjma.pl Loading DB routines from perl5db.pl version 1.60 Editor support available. Enter h or 'h h' for help, or 'man perldebug' for more help. main::(/Users/chap/private/lewis_folder/client/wjma.pl:4): 4: print "HEY\n"; DB<1>
So the problem occurs when I run perl -d from this one directory, which contains:The-Air:~/private/lewis_folder/client$ perl -d /Users/chap/private/per +l/wjma.pl Loading DB routines from perl5db.pl version 1.60 Editor support available. Enter h or 'h h' for help, or 'man perldebug' for more help. main::(/Users/chap/private/perl/wjma.pl:4): 4: print "HEY\n"; DB<1> HEY The-Air:~/private/lewis_folder/client$
I'm scratching my head here. Any suggestions?The-Air:~/private/lewis_folder/client$ ls -al total 56 drwxrwxr-x 8 chap staff 256 Jan 18 08:43 . drwxrwxr-x 7 chap staff 224 Apr 2 2020 .. drwxrwxr-x 3 chap staff 96 Jul 13 2013 con lrwxrwxr-x 1 chap staff 25 Nov 27 2015 dict -> /Users/chap/priv +ate/text/ drwxrwxr-x 4 chap staff 128 Sep 29 2010 dictorg -rwxrwxr-x 1 chap staff 15749 Jan 18 07:29 lewis-client -rw-rw-r-- 1 chap staff 4880 Jan 17 19:56 lewis-client.config -rwxr-xr-x 1 chap staff 61 Jan 18 08:22 wjma.pl The-Air:~/private/lewis_folder/client$
Back to
Seekers of Perl Wisdom