Open TheMeaningfulEngineer opened 4 years ago
I think it would be good to improve the integration with e.g. python-remote-pdb then. Is it about the terminal size only? (https://github.com/ionelmc/python-remote-pdb/issues/21)
Can you provide an example on how to use/try this locally, so that others (i.e. me) can see how it works easily?
(Also make sure to use pdb++ master - there have been fixes also to the terminal size detection etc, and IIRC it can be forced/set already.)
I think it would be good to improve the integration with e.g. python-remote-pdb then. Is it about the terminal size only? (ionelmc/python-remote-pdb#21)
It's terminal size, arrow keys and autocomplete.
Can you provide an example on how to use/try this locally, so that others (i.e. me) can see how it works easily?
Will come back with an example and how it behaves on master. :+1:
Am not the best screencast creator in the world, but hopefully this will do :)
It seems there are multiple issues here.
pdbpp:
sticky
mode deals with line breaks. If the line gets shopped in the middle of a colored text, the prompt will end up colored. This is the same for both remote and non remote.remote-pdb:
the arrows and auto-completion with tabs doesn't when debugging remotely. This is likely related to the comment from remote pdb.:
Afaik pdb++ expects a tty. Remote-pdb's goal is to avoid implementing a full telnet protocol to support ttys.
That's out of scope of remote pdb.
# Setting the environment
git clone https://github.com/pdbpp/pdbpp.git
python3 -m venv pdbpp_master
source pdbpp_master/bin/activate
pip3 install wheel python-remote-pdb
cd pdbpp
pip3 install .
cd ..
#remote_debug.py
from remote_pdb import RemotePdb
import pdb
RemotePdb('127.0.0.1', 4444).set_trace()
#pdb.set_trace()
print("This is a very long line. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35.")
print("This is a very long line. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35.")
print("This is a very long line. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35.")
# Commands executed in the example
# Terminal 1:
python3 remote_debug.py
# Switch to the remote debugger in the source
python3 remote_debug.py
#Other terminal:
telnet 127.0.0.1 4444
Have just tried epdb
again.
Have misinterpreted the lack of the pdbpp
prompt. Regardless of that a lot of the functionality remains preserved:
sticky
adapts to the terminal sizesource
works It dies when you try to edit
but regardless am finding it a much better experience than with remote_pdb
So what is the recommended remote debugger library to use that works best with pdbpp
currently?
Can you provide an example on how to use/try this locally, so that others (i.e. me) can see how it works easily?
After (briefly) reading thru this discussion I don't really see how you are using them together...?
Is far as python debuggers that can be used from the cli, pdbpp has for me enhanced the debugging experience significantly.
One major feature I'm finding missing and which has been implemented in other projects (epdb, python-remote-pdb) which attempt to extend
pdb
is the possibility to debug daemons.In other words they allow for a mechanism to attach into a process that isn't connected to a tty.
I'm mostly using one of them for these functions:
(Pdb++)
prompt but autocomplete doesn't work and the source code text can be chopped up. Addressing any of these is outside of the scope of the projectAre plans to extend
pdbpp
with this functionality?