inducer / pudb

Full-screen console debugger for Python
https://documen.tician.de/pudb/
Other
3k stars 230 forks source link

The "o" key for "view output" should probably just be disabled during remote/telnet debugging #369

Open Honghe opened 5 years ago

Honghe commented 5 years ago

Env:

-- coding: utf-8 --

from multiprocessing import Process import os from pudb.remote import set_trace

def info(title): print(title) set_trace() print('module name:', name) print('parent process:', os.getppid()) print('process id:', os.getpid())

def f(name): info('function f') print('hello', name)

if name == 'main': info('main line') p = Process(target=f, args=('bob',)) p.start() p.join()


log:

% python -m pudb.run demo_multiprocess.py main line pudb:6899: Please telnet into 127.0.0.1 6899. pudb:6899: Waiting for client...

pudb:6899: Now in session with 127.0.0.1:37918.



After seeing the output screen through `o`, I can see the error indent output, and can not go back through hit `enter`.

![image](https://user-images.githubusercontent.com/1092722/70249027-c3854800-17b6-11ea-8a4d-921678c2fada.png)
inducer commented 5 years ago

The "o" key for "view output" should probably just be disabled during remote/telnet debugging (since you're already seeing the program output somewhere else).

Honghe commented 5 years ago

May I ask where to see the print stdout output? I don't see the subprocess output in the main process stdout. Thanks! image

inducer commented 5 years ago

Are you meaning to use remote debugging at all? It seems like you're confused. Try from pudb import set_trace.