I am doing remote debugging with PerlDebug in vscode. I ran
PERLDB_OPTS="RemotePort=localmachine:5000 perl -d myscript.pl
on "remotemachine" than I ran vscode PerlDebug on "localmachine" and was able to step over lines of script.
But how to watch variables now? I can watch some variables like part1, part2 and value in attached example, but I can't watch $events, probably because it is a hashmap.

Also it displays nothing in VARIABLES pane.
Is it possible to see hashmap vars here?
Instead of entering $events for the watch expression, try entering %events. Then the extension will understand that it is a hash map and not a scalar variable.
Note: When I tested this, I was not able to show array and hash refs in the WATCH panel. So if $h is a hash ref, adding %$h as a watch expression, does not work (it does not show nested values). I was however able to work around this by declaring an alias to $h like this:
use v5.26;
use feature qw(declared_refs refaliasing);
my \%hh = \%$h;
and then watch %hh instead of %$h. This worked for array refs also.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With