pudb icon indicating copy to clipboard operation
pudb copied to clipboard

Added auto save/load of watch expressions

Open lechat opened this issue 10 years ago • 7 comments

lechat avatar Jun 24 '15 15:06 lechat

Thanks for your contribution! I'm not completely sure about this functionality though. I think of a watch expression as something you add while poking around in a single function--and so having them saved globally sort of assumes that you're going to be poking around the same function after the next restart of the debugger.

I'm also not quite sure I like how the code is written, since the saving happens as part of what is supposed to be a UI update.

The pain point solved by this is that retyping watch expressions is cumbersome and takes time. An alternate UI design might be to keep a history of watch expressions that a user typed in in the past and to offer those up when a new watch expression is being created. It would probably be nice to make it efficient to quickly add multiple expressions from that history in one go. What do you think?

inducer avatar Jun 28 '15 17:06 inducer

I think that option to have persistent watch expressions is very important for me. I'm entering the same function over and over and over, and writing the same things is annoying.

Also, it would be nice if console remember history (for same reasons) and panels remember their sizes (but it's BTW)

maho avatar Oct 16 '17 08:10 maho

I think you could say the same thing about breakpoints. Once you're done debugging something you don't really need your breakpoints any more. But while debugging, it's good to have them saved, because you typically have to restart the debugger many times. So I think saving them is nice, as long as it's also easy to clear them once you no longer need them.

asmeurer avatar Oct 16 '17 17:10 asmeurer

Breakpoints are auto-saved out of the box.

maho avatar Oct 30 '17 09:10 maho

@lechat Thanks a lot for this contribution. It's a saver. I had to start debugger over and over with several watch expressions. Having to type them each time was really annoying.

igordejanovic avatar Jul 24 '18 21:07 igordejanovic

I also like to see this in the upstream, which makes the debugger much useful for me. When I debug a function, I need to restart the program multiple times to see if my modification is effective. In addition, I need to track multiple variables inside a function. Retyping those variables in a watch every time is not acceptable for me. For now, I need to print them on the screen. I wonder what is the designed workflow of pudb currently for this kind of debug.

zhou13 avatar Jan 28 '20 09:01 zhou13