-
Notifications
You must be signed in to change notification settings - Fork 35
Breakpoints stop in wrong place (wrong file) #124
Comments
@gstead: Try replacing the relative path in use FindBin;
use lib "$FindBin::Bin"; Some months ago I changed all the test scripts to use that, and if this makes a difference, it would explain why the test suite passes on your system. |
Many thanks for the suggestion. I changed those lines to switch to an absolute path, but the behavior stayed the same. Included an animated gif below in case it helps. I believe the debugger may have stopped in the right place...vscode just displays the wrong place (wrong file?). In the gif I type the |
I guess I have the same issue as yours but on Windows. Your code debugging works correctly on my macOS 10.14.6 with internal Perl 5.18.4 (that came with the OS) & PadWalker 2.3. But on my Windows it behaves as the gif shows. I think this problem somehow connected with the "Variable, Watch, Step by Step not working" issue. The '.' path cannot be resolved for an unknown reason so the debugger doesn't know where to stop or put the yellow cursor. If we can find out how we can fix it on your plarform maybe we can get closer resolving the other issue too. |
As I recall it, when the debugger stops, we send a StoppedEvent. vscode will then make a StackTrace request, and we respond with StackFrames that indicate their Source. The published version of the debug extension generates the StackTrace with the perl5db.pl
versus
The older version of the debugger produces empty output. There may be other such issues. In any case, checking what Sources we report would probably be the biggest clue. I would also suspect that #91 fixes this problem. |
perl-debug is great and a main reason I switched to vscode. But I can't get breakpoints to break at the right place.
To reproduce:
code .
TestPackage.pm
. I suggest somewhere insub a
orsub b
c
in console)TestPackage.pl
instead of the breakpoints inTestPackage.pm
If I had to guess, I'd day the debugger breaks on the correct line in
TestPackage.pm
. But perhaps vscode loads the wrong file and displays the break in the wrong place.My environment
Mac OS/X Mojave; perl 5.16.3; perlbrew; Perl Debug 0.6.3
vscode details:
Things I debugged/checked:
Check 1) confirm the cli debugger works correctly (no vscode):
Check 2) in
launch.json
I activated"debugRaw": true
and"debugLog": true
and then monitored the OUTPUT console while debugging. The commands there look correctf TestPackage.pm
,b <line>
to set breakpoints, andy 0
andy 1
This is exactly as one would expect.
Check 3) read
DEBUGGING.md
and then confirmed all debugger tests pass:The text was updated successfully, but these errors were encountered: