Author Topic: Python, breakpoints skipped  (Read 694 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2512
  • Hero Points: 206
  • Text
Python, breakpoints skipped
« on: August 13, 2020, 07:51:21 pm »
A couple of times now I've hit F5 to start debugging, and my breakpoints were not hit -- its like Slickedit isn't actually setting the breakpoint.

jporkkahtc

  • Senior Community Member
  • Posts: 2512
  • Hero Points: 206
  • Text
Re: Python, breakpoints skipped
« Reply #1 on: August 13, 2020, 07:55:43 pm »
In this case I have a single breakpoint at line 99.
I hit F5, and the script got an error (as expected) in code past line 99.

When I look at "breakpoints" i see that the break at 99 exists.
I click it, disabling it.
Slick locks up for a minute or so, then:
---------------------------
SlickEdit Pro
---------------------------
Error disabling breakpoint:  Timeout
---------------------------
OK   
---------------------------

THe python that Slick launched is still alive.


patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1682
  • Hero Points: 142
Re: Python, breakpoints skipped
« Reply #2 on: August 13, 2020, 08:34:12 pm »
I have not seen the missed breakpoint problem.  I did find a test here where I can get a timeout disabling a breakpoint in some cases, so I will look into that.

For the missed breakpoint, the logging for the debugger is complete enough where I may be able to see what's going wrong without reproducing it, if you want to do a run of that with it turned on.

You'd turn on debug logging (set-var def-debug-logging 2), run the scenario through the debugger, turn the logging back off (set-var def-debug-logging 0), and the upload the CONFIG_DIR/25.0.0/logs/debug.log and the CONFIG_DIR/logs/dapcomm.log.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1682
  • Hero Points: 142
Re: Python, breakpoints skipped
« Reply #3 on: August 13, 2020, 09:40:06 pm »
The breakpoint problem can happen when disabling the last enabled breakpoint in the file.  Fixing this for the next beta. 

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1682
  • Hero Points: 142
Re: Python, breakpoints skipped
« Reply #4 on: August 14, 2020, 08:26:33 pm »
For your project with the skipped breakpoint, is it or one of its dependencies using the multiprocessing module?  I noticed looking through the code that I'm not setting up PTVSD correctly for that, so that could cause a breakpoint to be missed.

jporkkahtc

  • Senior Community Member
  • Posts: 2512
  • Hero Points: 206
  • Text
Re: Python, breakpoints skipped
« Reply #5 on: August 14, 2020, 08:54:24 pm »
I'm not intentionally using multiprocessing in any way.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1682
  • Hero Points: 142
Re: Python, breakpoints skipped
« Reply #6 on: September 09, 2020, 08:42:11 pm »
Do the skipped breakpoints still happen for you?  There was one thing I fixed in Beta 3 that was interpreter version specific that could have possibly made it so breakpoints weren't set before the program started running.  But I'm not sure if that's what you ran into, as it would also put out some error messages into the Build window.

Outside of that, I haven't been able to reproduce anything like that.  If it still happens, and you can get it to happen, we can log what's going on between SlickEdit and the debugging backend.  There isn't a huge cost for turning on the logging for the Python debugger, other than having to clean out the log files periodically so they don't grow too large.


jporkkahtc

  • Senior Community Member
  • Posts: 2512
  • Hero Points: 206
  • Text
Re: Python, breakpoints skipped
« Reply #7 on: September 09, 2020, 08:54:18 pm »
I've not seen it, but I haven't been debugging python much in the last week or two.