Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Issuing Continue ignores breakpoints and runs to end #95

Open
drq883 opened this issue Apr 16, 2019 · 12 comments
Open

Issuing Continue ignores breakpoints and runs to end #95

drq883 opened this issue Apr 16, 2019 · 12 comments

Comments

@drq883
Copy link

drq883 commented Apr 16, 2019

No description provided.

@drq883
Copy link
Author

drq883 commented Apr 16, 2019

I'm running vscode on a Mac and finally got the debugger working.
I can single step, step into and out of functions, etc., but when I click the Continue button, or press F5 again the debugger runs to the end without stopping at any breakpoints.

@remicharleslageixarena
Copy link

I have the same probleme when I use perl debugger vscode on ubuntu 18.04.2

@MrSilco
Copy link

MrSilco commented Apr 17, 2019

I'm very happy too that I can use the debugger on macOS. Anyway this breakpoint issue occurs when you have predefined breakpoints. Somehow the started debugger doesn't sense them. Fortunately you can workaround it by deactivating your existing ones from the breakpoints tab before starting the debugger then when it started activate them.

@drq883
Copy link
Author

drq883 commented Apr 17, 2019

Thanks @MrSilco, that worked for me as you say.

This will work in the meantime, but it would really be nice if the debugger knew about the predefined breakpoints.

@hoehrmann
Copy link
Collaborator

@drq883 : Which version of the extension? Have you tried enabling the debugRaw setting in launch.json? The output could give us a clue what is going on.

@drq883
Copy link
Author

drq883 commented Apr 18, 2019 via email

@remicharleslageixarena
Copy link

remicharleslageixarena commented Apr 18, 2019 via email

@drq883
Copy link
Author

drq883 commented Apr 19, 2019

The perl script I have is:

#!/usr/bin/perl

my $variable = 'foo';

print "Start\n";

print "Looping\n";
for my $index (qw(1 2 3 4 5)) {
    print "  $index\n";
}

print "End\n";

I have a breakpoint at the "print $index\n"; line before I start the debugger. I start the debugger, click the continue button and it runs to the end. While in the debugger, if I unset the breakpoint and set it back, continue stops as expected.

I've attached the debugRaw.txt file from when it doesn't stop properly:

debugRaw.txt

@hoehrmann
Copy link
Collaborator

@drq883 : Sounds like #75 which was fixed in 0.6.0 released yesterday. Could you upgrade and try again?

@drq883
Copy link
Author

drq883 commented Apr 19, 2019

0.6.0 seems to have fixed this issue. But it seems once I have debugRaw set to true. I can't undo that. When I look in Output, I still she the debugRaw output. That's not really a problem tho.

@hoehrmann
Copy link
Collaborator

@remicharleslageixarena : Could you give 0.6.0 a try?

@drq883 : Very possible that 0.6.0 ignores the setting and always generates that output window, I believe I fixed something like that recently (in #91).

@dseynhae
Copy link

dseynhae commented May 7, 2020

My breakpoints are also ignored:
The break points in the main file work just fine, but the breakpoints in other files are ignored.
As a work around, there are two options:

Stop the debugger manually

Go to the source code where you want the break point, and enter right before the line where you want to stop:

$DB::single=1

From now on, this will indeed act like a breakpoint. However:

  • It requires modifying the source code.
  • It does not show up as a breakpoint in the VS Code GUI.

Stop the debugger on load

  1. Start the debugger
  2. Go to the DEBUG CONSOLE and enter the following breakpoint:
b load <file_where_you_want_breakpoint>
  1. Continue the debugger; It will stop as soon as the file gets loaded (require).
  2. Enter the desired breakpoints in this file (you can't predefine them...).

The breakpoints in that file will now be active. However:

  1. It requires a manual breakpoint on load for each file up front.
  2. You have to reenter the breakpoints every single debug session.

Observations

I think this is a limitation of the Perl Debugger; I'm not sure if any of the methods documented above can be "automated" through a VS Code extension???

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants