Simple howto debugging openerp7 with intellij idea on windows
Prerequests:
- installed IntelliJ Idea 12
- installed Openerp7 openerp-allinone-setup-7.0-latest.exe
Step by step:
- install intellij python plugin
- download and install python 2.6 (i prefere portable version)
- copy listed files from portable python (F:\PortableApps\PortablePython_1.1_py2.6.1\App\)
python.exe
Lib\site.py
Lib\Queue.py
Lib\trace.py
- create new python project (openerp7debug) and configure python sdk
->Python SDK->local->F:\OpenERP 7.0-20130731-231106\Server\server\python.exe->next->finish
- right click openerp7debug->new->python file->openerp-server.py->add content
import openerp
if __name__ == "__main__":
openerp.cli.main()
- create debug configuration
Script parameters: "–config=F:\OpenERP 7.0-20130731-231106\Server\server\openerp-server.conf"->
Working directory: F:\OpenERP 7.0-20130731-231106\Server\server->OK
- add breakpoint (on line openerp.cli.main() for example) and click debug, test breakpoints, inspect vars, test UI from browser
- Happy debugging!
Please sign in to leave a comment.
Many thanks for your tutorial!
I want to debug OpenERP using PyCharm, but I get import errors.
I had setup PyCharm according to your description. Now I try to debug "openerp-server.py" file.
1) If I copy python.exe from "Portable Python 3.2.5.1" to approriate OpenERP directory and specify Python interpreter C:/Program Files (x86)/OpenERP 7.0-20140622-231040/Server/server/python.exe I get the following error:
Process finished with exit code -1073741515 (0xC0000135)
---
2) If I try to debug using Portable Python 3.2.5.1 from it's install path, I get an exception
ImportError: No module named addons
---
3) If I try to debug using Python 3.4 I get an exception
ImportError: No module named cli
(It seems that the last interpreter gave the best results, as it was able to import addons)
How could I fix this issue?
Kind Regards,
Mario