Re: [Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-29 Thread Steve Dower
On 29Oct2018 1709, Nathaniel Smith wrote: > I also wonder if it would be useful to give pdb the ability to break > when an exception is *raised*, rather than when it's caught? This is basically the first feature I implemented as an intern at Microsoft back in 2011 :) (for Visual Studio's Python de

Re: [Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-29 Thread Glenn Linderman
On 10/29/2018 3:07 PM, Greg Ewing wrote: When I have a bug that only happens after hours of run time, I try to find a much shorter test case that reproduces it. Mmm. Yeah.  But that's often a guessing game, with a low chance of success. ___ Python-Dev

Re: [Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-29 Thread Chris Angelico
On Tue, Oct 30, 2018 at 11:10 AM Nathaniel Smith wrote: > I also wonder if it would be useful to give pdb the ability to break > when an exception is *raised*, rather than when it's caught? This is veering into python-ideas territory (or even python-list), but the first big concern that comes to

Re: [Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-29 Thread Nathaniel Smith
On Mon, Oct 29, 2018 at 11:59 AM, Chris Jerdonek wrote: > A simpler feature that could possibly help him (assuming there isn't any > external state to deal with) would be the ability to save everything at a > certain point in time, and then resume it later. He could rig things up to > save the sta

Re: [Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-29 Thread Greg Ewing
When I have a bug that only happens after hours of run time, I try to find a much shorter test case that reproduces it. -- Greg ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://m

Re: [Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-29 Thread Chris Jerdonek
I have another idea on this. What about the idea of starting the program, and then a few minutes later, starting the same program a second time. If the first program errors, you could examine the second one which is a little bit behind. Before starting the second one, perhaps you could even make a

Re: [Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-29 Thread Chris Jerdonek
A simpler feature that could possibly help him (assuming there isn't any external state to deal with) would be the ability to save everything at a certain point in time, and then resume it later. He could rig things up to save the state e.g. after every hour: 1 hour, 2 hours, etc. Then if an error

Re: [Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-29 Thread Armin Rigo
Hi, On Sat, 27 Oct 2018 at 01:50, Steven D'Aprano wrote: > [...] > > So I was wondering if it would be possible to keep that context around > > if you are in the debugger and rewind the execution point to before > > the statement was triggered. > > I think what you are looking for is a reverse de

Re: [Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-26 Thread Steven D'Aprano
On Fri, Oct 26, 2018 at 04:18:37PM -0700, Ed Peschko wrote: > all, > > I was debugging a very long script that I was not all that familiar > with, and I was doing my familiar routine of being very careful in > evaluating expressions to make sure that I didn't hit such statements > as: > > TypeErr

[Python-Dev] short-circuiting runtime errors/exceptions in python debugger.

2018-10-26 Thread Ed Peschko
all, I was debugging a very long script that I was not all that familiar with, and I was doing my familiar routine of being very careful in evaluating expressions to make sure that I didn't hit such statements as: TypeError: unsupported operand type(s) for +: 'int' and 'str' anyways the script h