You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the issue. It looks like all the breakpoints that aren't hitting, the lines they're on don't have any executable code. Only the breakpoint on line 93 does.
Can you try it again and put the breakpoints on lines with actual code on them? I believe debugpy does try to look around the breakpoint for lines with code, but it's not a perfect search. It should work though if you move your breakpoints.
Like this one:
Try putting the breapoint on line 103 intead of line 104.
I can reproduce the problem myself:
If I debug this with Debug Python File, the first breakpoint is rebound to the line above it.
If I debug this with Debug Cell, the first breakpoint is skipped.
So I'm guessing either we don't do the special remapping to near lines in cell debugging or there's a bug in our remapping. But for now you should be able to get those breakpoints to work if you put them on lines with actual code.
Activity
rchiodo commentedon Jun 3, 2024
Thanks for the issue. It looks like all the breakpoints that aren't hitting, the lines they're on don't have any executable code. Only the breakpoint on line 93 does.
Can you try it again and put the breakpoints on lines with actual code on them? I believe debugpy does try to look around the breakpoint for lines with code, but it's not a perfect search. It should work though if you move your breakpoints.
Like this one:
Try putting the breapoint on line 103 intead of line 104.
I can reproduce the problem myself:
If I debug this with
Debug Python File, the first breakpoint is rebound to the line above it.If I debug this with
Debug Cell, the first breakpoint is skipped.So I'm guessing either we don't do the special remapping to near lines in cell debugging or there's a bug in our remapping. But for now you should be able to get those breakpoints to work if you put them on lines with actual code.
kaare-mikkelsen commentedon Jun 3, 2024
you're right, this fixes it. Thanks a lot :)