P is for Practical | |
PerlMonks |
Re^2: Debugger Questions - Variable Scope (source++)by GotToBTru (Prior) |
on Feb 17, 2017 at 16:21 UTC ( [id://1182217]=note: print w/replies, xml ) | Need Help?? |
Almost 3 years later, I actually tried this. It does not appear to work: execution does not stop when the variable changes value, and the L command does not show the watchpoint. My Perl version is 5.8.8; that might be important. You're right, the solution is pretty simple. Create a ref to the variable of interest and make the watchpoint the dereferenced value. This has the very slight disadvantage of having to wait until the variable of interest has been created, but avoiding the maddening interruptions is wonderful! Program slightly modified for demonstration purposes:
Debug session - Was:
Now:
In Section
Seekers of Perl Wisdom
|
|