It is currently Wed May 23, 2012 4:29 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: debugging with eclipse and pydev in 10 steps
PostPosted: Sat May 03, 2008 11:10 am 
Offline

Joined: Mon Nov 26, 2007 5:49 pm
Posts: 132
Here is a post to explain how I did to debug the server code. It's also a post to validate that the source code is really not closed.

1/I installed eclipse 3.2 with pydev. (As I am coming from a Java J2EE world, I already had.)

2/installed Python 2.5

3/ installed all the required python libraries:
see http://www.tinyerp.org/wiki/index.php/I ... allWindows
check all the dependencies and install them.

4/checked out the sources (from branch 4.2: see other posts explaining this). let's say in directory c:\tiny

5/ open eclipse and create a pydev project located at c:\tiny

6/ put a configuration file (tinyerp-server.conf) in the root folder c:\tiny, where tinyerp-server.py is located.

7/ right click on tinyerp-server.py and start it in debug.

8/ start the client and connect to the server.

9/ putted a breakpoint in web_services.py#objects_proxy#execute and exec_workflow.

10/ start debugging.

this was done on a windows platform, where postgres (8.2) was of course already installed.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 05, 2008 9:48 am 
Offline

Joined: Tue Oct 24, 2006 10:43 am
Posts: 591
great post man! why not create a wiki page for it? there are many people who don't know stuff like that and this post will be forgotten after a few days or weeks.

_________________
knerz


Top
 Profile  
 
 Post subject: soon to come
PostPosted: Fri Jun 27, 2008 11:19 am 
Offline

Joined: Mon Nov 26, 2007 5:49 pm
Posts: 132
I will need to create a document for installation in a production environment and will do this for windows xp and linux fedora core 9.
and also a document for a development environment:
eclipse 3.3 with pydev.

So I will create a new item in the wiki.

I finally choose to go for openerp instead of openbravo even if the pos module is lacking for now, but I am sure this gap will be fullfilled by the open erp team (Don't want to go for openbravo synchro), and even if I have 5 years J2EE and .NET behind, I will need to delve into python... why not.... Bruce eckel has started a book thinking in python, it will remind me of my old thinking in java days.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 08, 2009 1:20 pm 
Offline

Joined: Thu Nov 13, 2008 2:57 pm
Posts: 38
Location: Réunion
bonjour,

i try to use eclipse. But, i got a problem, i can't connect me with the client, because i don't launch the server wtih postgres user. How do you do to specify the user in eclipse ?

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 09, 2009 3:40 pm 
Offline

Joined: Fri Nov 02, 2007 6:59 pm
Posts: 114
Hi!

Find openerp-server.py, right click, Debug As->Debug Configurations..., there you should find the Arguments tab and then write the command line parameters to the Program arguments field.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2009 8:58 am 
Offline

Joined: Thu Nov 13, 2008 2:57 pm
Posts: 38
Location: Réunion
I found the solution.
In fact, I was launching erp directly with user postgres.
I change this by creating a postgre user related to my ubuntu user (ex:bmatt)
following those steps:

sudo su postgres

createuser bmatt
Le nouvel rôle est-t'il un superutilisateur ? (o/n) n
Le nouvel rôle doit-il être autorisé à créer des bases de données ? (o/n) o
Le nouvel rôle doit-il être autorisé à créer de nouveaux rôles ? (o/n) n
exit

I modify /etc/postgresql/8.2/main/pg_hba.conf
adding a new line "local all bmatt ident sameuser"

sudo invoke-rc.d postgresql-8.2 restart


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 05, 2009 5:02 pm 
Offline

Joined: Sun Jan 04, 2009 8:11 pm
Posts: 7
Hello,

Does somebody know if it is possible with Eclipse and PyDEV to do remote debugging like we can do in the java world (for instance, remote debug java servlet on tomcat distant server) ?

I currently have strange behavior on a server that I can't reproduce on my dev machine. It should be great to do some distant debug.


Regards
Banania


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 05, 2009 2:04 pm 
Offline

Joined: Sun Aug 09, 2009 10:52 pm
Posts: 12
Does anybody know how to correctly import a module "report_sxw". I included two projects to eclipse: openobject-addons and openobject-server. When i try to run __init__.py in an account module i've got such error: "ImportError: cannot import name report_sxw". I think there is problem in how i add references for projects, because when i debug step by step in an account module i noticed that python interpreter jump into report module in an account module but there is no "report_sxw" module due to it is in openobject-server/bin/report folder. How to direct an interpreter to the right way?


Top
 Profile  
 
 Post subject: Clients won't connect to server under pydev
PostPosted: Sun Apr 04, 2010 7:22 pm 
Offline

Joined: Wed Jul 01, 2009 9:58 pm
Posts: 11
Location: San José, Costa Rica
I am trying to run the openerp server in eclipse using PyDev.

I already configured psql and changed the perms and I got running the server inside pydev.

But it seems that the charset is wrong. The python console shows me weird characters on the server log. And when I try to connect, either with web-client or with gtk client, using netrpc or xmlrpc, it's the same thing: the server complaints about receiving a wrong formatted request. I am pretty sure it is because the same charset problem that it is getting bad formed requests.

I have tried a lot of things but I haven't had any success running pydev with utf8.

Does anyone know how to do it?

Thanks

_________________
--
Carlos Vásquez
CEO
ClearCorp S.A.

+506 8351-4484
carlos.vasquez@clearcorp.co.cr


Top
 Profile  
 
 Post subject: Re: debugging with eclipse and pydev in 10 steps
PostPosted: Mon Mar 14, 2011 10:37 pm 
Offline

Joined: Tue Jan 18, 2011 5:16 pm
Posts: 236
http://satmarean.blogspot.com/2011/03/o ... erver.html
please see this post on debugging on a live headless server

We use a server with Linux,
An Windows or Linux Client
PyDev and Eclipse

_________________
OpenERP debugging with Eclipse on headless server


Top
 Profile  
 
 Post subject: Re: debugging with eclipse and pydev in 10 steps
PostPosted: Wed Aug 03, 2011 2:31 pm 
Offline

Joined: Mon Jul 11, 2011 6:14 pm
Posts: 23
Location: Lisbon, Portugal
The link in step 3/ is dead.
Use http://openobject.com/wiki/index.php/Manual_Installation:Installation_Manual/ServerInstallWindows instead.

DReis


Top
 Profile  
 
 Post subject: Re: debugging with eclipse and pydev in 10 steps
PostPosted: Tue Sep 13, 2011 10:22 pm 
Offline

Joined: Thu Mar 10, 2011 4:30 pm
Posts: 145
Hi I try to use eclipse with pyDev to debug my modules in openERP.
So I use this tutorial http://pkrashdi.megabyet.net/wiki/index.php/open-erp/36-openerp-customize/122-tutorial-on-setting-up-openerp-602-source-code-in-eclipse-ganymede-version-341-under-windows-platform- but I have problem at the last steps.

I install all steps successfully but I don't understand how to use the eclipse as debugger. I do a right click on services (server-client), start the client, connect to my db but what can I see on ecplipse to help me as debugger? I can't see something on console.

Is there any tips about debugging openerp development with eclipse-pydev?

Thanks.


Top
 Profile  
 
 Post subject: Re: debugging with eclipse and pydev in 10 steps
PostPosted: Wed Sep 14, 2011 10:14 am 
Offline

Joined: Thu Mar 10, 2011 4:30 pm
Posts: 145
In addition when I try to run server and then the client the dropdown menu of my dbs is is something unusual. The name has something wrong! Look at the screenshot.
http://imageshack.us/photo/my-images/641/openerpeclipsedbbug.jpg

And I can't connect to my db!


Top
 Profile  
 
 Post subject: Re: debugging with eclipse and pydev in 10 steps
PostPosted: Sat Sep 17, 2011 11:52 am 
Offline

Joined: Thu Aug 11, 2011 6:34 am
Posts: 4
I cannot debug, please help me !
I'm using Python 2.5.4, Eclipse with PyDev.
And I also added PYTHONPATH with External Library is library.zip (which is get from All In One installation).


pydev debugger: CRITICAL WARNING: This version of python seems to be incorrectly compiled (internal generated filenames are not absolute)
pydev debugger: The debugger may still function, but it will work slower and may miss breakpoints.
pydev debugger: Related bug: http://bugs.python.org/issue1666807
-------------------------------------------------------------------------------
pydev debugger: warning: psyco not available for speedups (the debugger will still work correctly, but a bit slower)
pydev debugger: starting
pydev debugger: Unable to find real location for: threading.pyo


I see that the files which got message "Unable to find real location" may be the problems.
They are in library.zip but Pydev debugger cannot see.

Is anybody help me to understand this bug.


Top
 Profile  
 
 Post subject: Re: debugging with eclipse and pydev in 10 steps
PostPosted: Wed Feb 15, 2012 6:51 pm 
Offline

Joined: Wed Feb 15, 2012 6:28 pm
Posts: 1
Location: United States
I am trying to debug openerp 6.1. Can anyone Add/update this post for 6.1. Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP