在Eclipse中debug源码OpenERP7.0的步骤

原文地址:http://stackoverflow.com/questions/12298811/how-can-i-debug-openerp-code-in-to-the-eclipse


To debug your Openerp+python code in eclipse, start eclipse in debug perspective and follow the given steps:


1: Stop your openERP running server by pressing "ctr+c".


2: In eclipse go to Menu "Run/Debug Configurations". In configuration window under "Python Run", create new debug configuration(Double click on 'Python Run').


3: After creating new debug configuration follow the given steps:


3.1: In "Main" tab under "Project", select the "server" project or folder (in which Openerp Server resides) from your workspace.


3.2: Write location of 'openerp-server' under "Main Module".


    Ex: ${workspace_loc:server/openerp-server}.


3.3: In "Arguments" tab under "Program Arguments", click on button "Variables" and new window will appear.


3.4: Then create new "Variable" by clicking on "Edit Variables" button and new window will appear.


3.5: Press on "New" button and give your addons path as value.


    Ex: --addons ../addons,../your_module_path


3.6: Press Ok in all the opened windows and then "Apply".


4: Now into "PyDev Package Explorer" view go to 6.1/server and right click on "openerp-server" file, Select 'Debug As --> Python Run'.


5: Now in "Console" you can see your server has been started.


6: Now open your .py file which you want to debug and set a break-point.


7: Now start your module's form from 'gtk' or 'web-client' and execution will stop when execution will reach to break-point.


8: Now enjoy by debugging your code by pressing "F5, F6, F7" and you can see value of your variables.


--EOF--

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值