python远程调试_python winpdb远程调试

defstart_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

)defstart_embedded_debugger_interactive_password(

fAllowUnencrypted=True,

fAllowRemote=False,

timeout=TIMEOUT_FIVE_MINUTES,

fDebug=False,

stdin=sys.stdin,

stdout=sys.stdout

):if g_server is notNone:return

if stdout is notNone:

stdout.write(‘Please type password:‘)

pwd= stdin.readline().rstrip(‘n‘)return __start_embedded_debugger(

pwd,

fAllowUnencrypted,

fAllowRemote,

timeout,

fDebug

)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值