pudb icon indicating copy to clipboard operation
pudb copied to clipboard

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

Open Honghe opened this issue 6 years ago • 3 comments

Env:

  • SecureCRT 7.2.3 (work on local host)
  • Python 3.6
  • Ubuntu 18.04 (remote Linux)
  • Windows 10 (local host)

# -*- 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

Honghe avatar Dec 05 '19 15:12 Honghe

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).

inducer avatar Dec 05 '19 21:12 inducer

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

Honghe avatar Dec 06 '19 02:12 Honghe

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

inducer avatar Dec 06 '19 05:12 inducer