Replies: 4 comments
-
It seems as though you're wanting this to affect the shell in the debugger. Have you considered using pudb's custom shell feature? |
Beta Was this translation helpful? Give feedback.
-
I have not yet. If that is another way to go, then i will investigate it. Thank you! |
Beta Was this translation helpful? Give feedback.
-
hello again! so i've hooked up the custom_shell and set up my file i've found that i need to use
To use pprint in my console, i can just do `pprint("hello") and it comes out correctly. is there a way i can run an entire .py file instead of just doing line by line in my i've tried the following below and it will output a print statement but it won't import pprint. See below for 2 versions of my
|
Beta Was this translation helpful? Give feedback.
-
Also, i've just realized that my variables from my code are not imported into the custom shell. So the options are now to either import locals and globals into the custom shell or to somehow beable to setup a startup script with the classic shell that currently exists in pudb. The latter is the preferred because then i don't have to leave pudb and i can see all of my code, stack, breakpoints, etc instead of having to hop back and forth between the custom shell and the code. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
Is there a way to add a hook(not sure if this is the correct usage of the term 'hook') for a PYTHONSTARTUP variable to point to a
startup.py
file that can be ran whenever pudb starts up?import pprint
orimport os
with every time i startup pudb for the python console, it would already run automatically and i would only need to typepprint.pprint(variable_to_pretty_print)
I'm able to get it to work with my ipython shell from terminal however I can't get it to work in pudb's ipython. I figure if i can get it to work for my terminal's ipython, its possible for pudb?
Describe the solution you'd like
I would like for pudb to search my .zshrc file to look for a PYTHONSTARTUP or similar variable which would then point to a /my/pudb/startup.py script or something similar.
Describe alternatives you've considered
custom_shell setting
to set up a custom shel with your needs.Additional context
Add any other context or screenshots about the feature request here.
What I tried
I gave it an attempt and modified the
run.py
. I tried in the iterm2 consolepython3 debug_me.py
but no dice. if there is somewhere else I should be modifying, please let me know.Beta Was this translation helpful? Give feedback.
All reactions