vscode-perl-debug icon indicating copy to clipboard operation
vscode-perl-debug copied to clipboard

Miscellaneous behavior of the script when setting a breakpoint

Open LazarenkoA opened this issue 6 years ago • 1 comments

Hello, I'm Russian, used Google translator. When I set the breakpoint in the script, the script stops working.

There is a suspicion that this is due to the fact that the file from the disk is not correctly read, the last line from the file is read, here is the code:

sub OpenAndReadFile() {
    my ($fileName) = @_;
    die "Ошибка открытия файла $fileName" unless open my $FH, "<:encoding(utf8)", $fileName;      
    my $txt;
    {
        local $/ = "\r";
        $txt = <$FH>;
    }
    close $FH;
    return $txt;    
}

gif: https://ibb.co/deBGSe

LazarenkoA avatar Aug 22 '18 12:08 LazarenkoA

Hi @LazarenkoA sorry about the slow response time - what OS + perl version and distribution are you using?

raix avatar Dec 13 '18 21:12 raix