python winpdb远程调试
1.使用rpdb2.start_embedded_debugger ,注意要将参数fAllowRemote 设置为True
2.winpdb前端GUI使用python2
3.rpdb兼容python2,3
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.https://segmentfault.com/a/1190000000356018
2.http://winpdb.org/docs/embedded-debugging/
python winpdb远程调试的更多相关文章
- python的远程调试(使用pycharm)
测试环境描述1:c++调用python,操作系统环境是linux 2:pycharm安装在windows 安装步骤 1:把pycharm-debug.egg上传到linux上面. 2:使用easy_i ...
- visual studio 2015使用python tools远程调试maya 2016
步骤: 1. 去https://apps.exchange.autodesk.com/MAYA/en/Home/Index搜索Developer Kit并下载,maya 2016可以直接点击这里下载. ...
- Python安装远程调试Android需要的扩展脚本
http://android-scripting.googlecode.com/hg/python/ase/android.py 拷贝到/Python27/Lib/site-packages这个目录下 ...
- 使用pycharm远程调试python代码
使用 pycharm 进行 python 代码远程调试 pycharm 的远程调试是从远程机器连接到本地机器,需要在远程机器的py文件中指定本地机器的IP和端口. 远程机器上,通过easy_insta ...
- 最简单方法远程调试Python多进程子程序
Python 2.6新增的multiprocessing,即多进程,给子进程代码调试有点困难,比如python自带的pdb如果直接在子进程代码里面启动会抛出一堆异常,原因是子进程的stdin/out/ ...
- 在ubunut下使用pycharm和eclipse进行python远程调试
我比较喜欢Pycharm,因为这个是JetBrains公司出的python IDE工具,该公司下的java IDE工具--IDEA,无论从界面还是操作上都甩eclipse几条街,但项目组里有些人使用e ...
- 利用PyCharm进行Python远程调试
背景描述 有时候Python应用的代码在本地开发环境运行十分正常,但是放到线上以后却出现了莫名其妙的异常,经过再三排查以后还是找不到问题原因,于是就在想,要是可以在服务器环境中进行单步跟踪调试就好了. ...
- 第四百零三节,python网站在线支付,支付宝接口集成与远程调试,
第四百零三节,python网站在线支付,支付宝接口集成与远程调试, windows系统安装Python虚拟环境 首先保证你的系统已经安装好了Python 安装virtualenv C:\WINDOWS ...
- 使用IntelliJ IDEA进行Python远程调试的需求(未完)
使用IntelliJ IDEA进行Python远程调试的需求(未完) 在研究深度学习Machlearning时,有时候需要借助ubuntu搭建的tensorflow环境,另外也有越来越多的运算程序只能 ...
随机推荐
- getRealPath函数编译报错问题
ServletActionContext.getRequest().getRealPath("");函数虽然已被淘汰,但在获取服务器绝对路径时仍有使用.关于 ServletActi ...
- SQLServer Management Studio登录框中的“服务器名”填写
SQL Server Management Studio登录框中的“服务器名”填写 by:授客 QQ:1033553122 打开MSSQL Management Studio,如图,登录框中怎么填写? ...
- Expo大作战(二十九)--expo sdk api之registerRootComponent(注册跟组件),ScreenOrientation(屏幕切换),SecureStore,
简要:本系列文章讲会对expo进行全面的介绍,本人从2017年6月份接触expo以来,对expo的研究断断续续,一路走来将近10个月,废话不多说,接下来你看到内容,讲全部来与官网 我猜去全部机翻+个人 ...
- 鸟哥的 Linux 私房菜Shell Scripts篇(四)
12.4 条件判断式 只要讲到『程式』的话,那么条件判断式,亦即是『 if then 』这种判别式肯定一定要学习的!因为很多时候,我们都必须要依据某些资料来判断程式该如何进行.举例来说,我们在上头的a ...
- mysql启动失败又一例
搭的wordpress报错: 后台用的mysql,之前也崩过,原因是虚拟内存耗尽,通过增加swap空间最终让数据重新启动. 但仅过一晚上,数据库再次崩溃.看来要查一查是什么程序耗尽资源. 执行top, ...
- windows7下的一个好玩的,你绝对不知道
今天学到了一个好东西,分享一下, windows7系统测试是可以的,其他系统暂时没测试,分享给大家玩玩: 在桌面新建一个文件夹: 文件夹重命名为:GodMode.{ED7BA470-8E54-465E ...
- SQLite基本操作-----IOS(如有雷同,纯属巧合)
一.常用方法 sqlite3 *db, 数据库句柄,跟文件句柄FILE很类似 sqlite3_stmt *stmt, 这个相当于ODBC的Command对象,用于保存编译好 ...
- strong vs copy
一.前言 在这里,我通过实例去介绍strong和copy的区别(%p打印出来对象的地址) ViewController.h #import <UIKi ...
- jQ 移动端返回顶部代码整理
//返回顶部 $('#btn-scroll').on('touchend',function(){ var T = $(window).scrollTop(); var t = setInterval ...
- 【ArcGIS】安装ArcEngine 10的顺序
Step1.安装VS 2010Step2.安装ArcGIS Desktop(不可跳过这步),如果直接安装ArcEngine,将出现如下错误提示因此必须首先安装ArcGIS Desktop或者ArcGI ...