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.
The-Air:~/private/lewis_folder/client$ cat wjma.pl
#!/usr/bin/env perl
use warnings;
use strict;
print "HEY\n";
Here's my perl executable:
The-Air:~/private/lewis_folder/client$ which perl
/Users/chap/perl5/perlbrew/perls/perl-5.34.0/bin/perl
Demonstrating that the program works:
The-Air:~/private/lewis_folder/client$ ./wjma.pl
HEY
Demonstrating running debugger on program, from within the problem directory. Note that it automatically runs to completion.
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 on the same program while in a different directory. Note that it behaves correctly, stopping on the first statement.
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>
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:~/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$
So the problem occurs when I run
perl -d from this one directory, which contains:
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$
I'm scratching my head here. Any suggestions?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.