Author Topic: Python debugger: Phantom breakpoint  (Read 502 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2554
  • Hero Points: 207
  • Text
Python debugger: Phantom breakpoint
« on: May 04, 2022, 11:19:41 pm »
#1: The python debugger seems to always break at the same line where you last did an F5/Continue.
While debugging python, it stops at a breakpoint.
Clean the breakpoint
Now, single step a bit - preferably into the body of a loop.
Press F5 to continue.
Now, every time thru the loop it breaks at the line where you last F5/Continued.
I can't see to find a way to avoid this - making stopping inside a loop very annoying.

#2:
Actually --- as I try to repro this, it seems much more confusing. Sometime F5 doesn't seem like it does anything.
I think what is happening here is that sometimes when it stops in the debugger, the current line isn't updated. Hitting F10 seems to fix it (Alt+PadStar does not).
Repro here is I set a break at a function call, and another break inside the function (inside a loop).
Start debugger, it stops at the 1st breakpoint.
F5 to continue
It stops again, apparently still at the first break, but then I hit F10, and I'm one line past the 2nd breakpoint.
I will have to experiment more, but #2 might be the real bug - it just sometimes looks like #1.


#3: Debug->DebuggerInformation brings up an empty dialog - no information while debugging Python.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1691
  • Hero Points: 142
Re: Python debugger: Phantom breakpoint
« Reply #1 on: May 05, 2022, 03:14:55 pm »
Ok, I'll take a look at it.  Thanks for the report.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1691
  • Hero Points: 142
Re: Python debugger: Phantom breakpoint
« Reply #2 on: May 11, 2022, 02:41:34 pm »
You're on linux, correct?  And what version of Python are you using when you see this?

jporkkahtc

  • Senior Community Member
  • Posts: 2554
  • Hero Points: 207
  • Text
Re: Python debugger: Phantom breakpoint
« Reply #3 on: May 11, 2022, 05:17:36 pm »
Windows, python 3.7.8
I have installed more pythons now, so I could try repro with other versions when I get a chance.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1691
  • Hero Points: 142
Re: Python debugger: Phantom breakpoint
« Reply #4 on: May 11, 2022, 05:41:04 pm »
Ahh, thanks.  I think being on Windows is probably more significant than the Python version, as I've tested with Python 3 versions earlier and later than that one.  There really shouldn't be any differences for the platforms, but sometimes timing and latency differences can expose bugs in how we handle debugger events and responses.  I'll move my reproduction effort to Windows. 

jporkkahtc

  • Senior Community Member
  • Posts: 2554
  • Hero Points: 207
  • Text
Re: Python debugger: Phantom breakpoint
« Reply #5 on: May 16, 2022, 10:02:21 pm »
Any update on this?
I've had to roll back to 26.0.1 since I've been doing a bunch of python debugging lately.

jporkkahtc

  • Senior Community Member
  • Posts: 2554
  • Hero Points: 207
  • Text
Re: Python debugger: Phantom breakpoint
« Reply #6 on: May 17, 2022, 04:33:30 pm »
Also I found a couple of more problems

#1 In Locals, booleans show up as "true" and "false" instead of "True" and "False".

You can press F9 to toggle a breakpoint.
You can also double-click in the left margin to set one.
#2 When I double-click in the left margin to delete a breakpoint, slick will often create another breakpoint farther down in the file, usually a disabled break point.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1691
  • Hero Points: 142
Re: Python debugger: Phantom breakpoint
« Reply #7 on: May 20, 2022, 02:58:24 pm »
Sorry, I was out of the office for a few days. 

So you're not seeing it in 26.0.1?   That's unexpected, it sounds like I need to review the 26.0.2 changes in the debugger.

#1 I'll fix that. 
#2 That's odd, I'll look into that as well.

jporkkahtc

  • Senior Community Member
  • Posts: 2554
  • Hero Points: 207
  • Text
Re: Python debugger: Phantom breakpoint
« Reply #8 on: May 20, 2022, 04:04:15 pm »
Right, 26.0.1 does not have this problem and 26.0.2 does consistently.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1691
  • Hero Points: 142
Re: Python debugger: Phantom breakpoint
« Reply #9 on: May 23, 2022, 01:10:24 pm »
I'm working on a fix for this.  It's not hot-fixable, but I can send you a 26.0.2 vsdebug.dll when I'm done so you can run with it.  I'll PM you once that's available.

Your guess in #2 of the original message is essentially right, where it's stopped in the correct place, but the stack frame shown by the debugger isn't being correctly updated in some cases.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1691
  • Hero Points: 142
Re: Python debugger: Phantom breakpoint
« Reply #10 on: May 23, 2022, 02:39:14 pm »
PM sent.

jporkkahtc

  • Senior Community Member
  • Posts: 2554
  • Hero Points: 207
  • Text
Re: Python debugger: Phantom breakpoint
« Reply #11 on: May 23, 2022, 05:10:48 pm »
That works - thanks!