Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a Watch expression using AutoKey (documentation suggestion) #582

Closed
mnieber opened this issue Jan 12, 2023 · 1 comment
Closed

Adding a Watch expression using AutoKey (documentation suggestion) #582

mnieber opened this issue Jan 12, 2023 · 1 comment

Comments

@mnieber
Copy link

mnieber commented Jan 12, 2023

I just figured out a fast way to add variables to the Watch section, using AutoKey. I don't know if this is of interest, but the following script adds the current selection as a new Watch entry (perhaps it's worth adding this to the documentation as a productivity hint)

import time
def pause():
    time.sleep(0.1)
    
text = clipboard.get_selection()
keyboard.send_key('<right>')
pause()
keyboard.send_key('<insert>')
pause()
keyboard.send_keys(text)
pause()
keyboard.send_key('<enter>')
pause()
keyboard.send_key('<left>')
@inducer
Copy link
Owner

inducer commented Jan 12, 2023

Thanks for pointing this out. I'm not totally sure what to do with this, since it goes quite a ways beyond pudb's current UI paradigm, and it is, for better or worse, a bit brittle and bolted-on (not a criticism), so I don't know if I'd like to encourage it. 🙂

That said, there are some valid questions that arise out of this:

  • What's a good UI for selecting variable names/other things in the source code? (Vimium-style? Urwid does have mouse support, even if we don't do very much with it ATM?)
  • How can we better support user-driven automation? ("plugins"?) Should we?

I think I'll push this over to discussions for the time being.

Repository owner locked and limited conversation to collaborators Jan 12, 2023
@inducer inducer converted this issue into discussion #583 Jan 12, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants