python winpdb遠端偵錯

來源:互聯網
上載者:User

標籤:follow   and   start   serve   rip   wait   adl   http   comm   

 1.使用rpdb2.start_embedded_debugger ,注意要將參數fAllowRemote 設定為True

    2.winpdb前端GUI使用python2

    3.rpdb相容python2,3

    4.winpdb-1.4.8下載

 

def start_embedded_debugger(    pwd,    fAllowUnencrypted = True,    fAllowRemote = False,    timeout = TIMEOUT_FIVE_MINUTES,    fDebug = False    ):    """    Use ‘start_embedded_debugger‘ to invoke the debugger engine in embedded    scripts. put the following line as the first line in your script:    import rpdb2; rpdb2.start_embedded_debugger(pwd)    This will cause the script to freeze until a debugger console attaches.    pwd     - The password that governs security of client/server communication    fAllowUnencrypted - Allow unencrypted communications. Communication will                        be authenticated but encrypted only if possible.    fAllowRemote - Allow debugger consoles from remote machines to connect.    timeout - Seconds to wait for attachment before giving up. If None,              never give up. Once the timeout period expires, the debuggee will              resume execution.    fDebug  - debug output.    IMPORTNAT SECURITY NOTE:    USING A HARDCODED PASSWORD MAY BE UNSECURE SINCE ANYONE WITH READ    PERMISSION TO THE SCRIPT WILL BE ABLE TO READ THE PASSWORD AND CONNECT TO    THE DEBUGGER AND DO WHATEVER THEY WISH VIA THE ‘EXEC‘ DEBUGGER COMMAND.    It is safer to use: start_embedded_debugger_interactive_password()    """    return __start_embedded_debugger(                        pwd,                        fAllowUnencrypted,                        fAllowRemote,                        timeout,                        fDebug                        )def start_embedded_debugger_interactive_password(    fAllowUnencrypted = True,    fAllowRemote = False,    timeout = TIMEOUT_FIVE_MINUTES,    fDebug = False,    stdin = sys.stdin,    stdout = sys.stdout    ):    if g_server is not None:        return    if stdout is not None:        stdout.write(‘Please type password:‘)    pwd = stdin.readline().rstrip(‘n‘)    return __start_embedded_debugger(                        pwd,                        fAllowUnencrypted,                        fAllowRemote,                        timeout,                        fDebug                        )

 

參考:

  1.1190000000356018

  2.http://winpdb.org/docs/embedded-debugging/

python winpdb遠端偵錯

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.