pudb icon indicating copy to clipboard operation
pudb copied to clipboard

Customizable breakpoint file location

Open cgbahk opened this issue 3 years ago • 4 comments

First, love to use pudb daily, thanks :heart:

Issue

Currently, breakpoint is saved globally, usually in ~/.config/pudb/saved-breakpoints-3.X.

But in most use cases, breakpoints are natual to be set by project.

  • Breakpoint set for project A means nothing for project B, and vice versa

So while debugging for several projects, the breakpoint file is getting bigger and bigger. This is not scalable nor ideal.

Suggest

It might be wonderful if there's way to set breakpoint by session. There are plenty of options I can imagine.

pudb cli option to get breakpoint file from user

pudb --breakpoint ./my_breakpoint.txt ...

I see #539 suggested to do this for configuration. This suggestion is breakpoint version of #539. I think configuration is mostly global, while breakpoint is natively per project. So getting local breakpoint file from user seems natual.

Convention for project-wise breakpoint file location to override global setting

Like .pudb_saved_breakpoint in project root overrides global breakpoint file, if exists.

pudb cli option to take breakpoint at runtime (#500)

#500 might be one option (but I prefer getting file as argument)

cgbahk avatar Oct 07 '22 13:10 cgbahk

I can see the utility in that. I'd be happy to consider a PR to this effect.

inducer avatar Oct 07 '22 14:10 inducer

This would be useful for my vim plugin as well!

mvanderkamp avatar Oct 07 '22 18:10 mvanderkamp

@inducer Is there currently a way to actually save the breakpoints that are set in a running session?

mezhaka avatar Jan 23 '23 16:01 mezhaka

The current set of breakpoints should be saved on exit.

inducer avatar Jan 24 '23 01:01 inducer