quick guide on using Boa-Constructor and remote debugger with SDK 1.7.6 new dev server

457 views
Skip to first unread message

timh

unread,
Mar 25, 2013, 6:30:05 AM3/25/13
to google-a...@googlegroups.com
Hi

Here is a quick note to get people started with an IDE based interactive debugger with the new dev server

You have to fix some code in the Boa Constructor remote debugger, but it does work ;-)

1. Get boa constructor.  I am running boa-constructor as installed with apt on xubuntu 12.10 alternately you can get a more up to date fork of boa here 

2. If you use the cwt fork you need to copy xmlrpclib.py from the python2.7 to <path to cwt boa>ExternalLibs  the xmlrpclib already there is very old
3. Change the __init__ method of <path to boa>/Debugger/RemoteClient.py  to have the following line first
  xmlrpclib.Transport.__init__(self)  

4.  create a debug.py file in your project

import sys
sys.path.append("<path to boa>")

#sys.path.append("/usr/share/boa-constructor/")
from Debugger.RemoteServer import start
start("username","password")



6. Start this dev server with the --python_startup_script= <somepath>/debug.py argument   - path should be where ever the debug.py is 
also you need to start it with --max_server_instances=1 

7. in Boa Constructor under the tools menu select "attach to the remote debugger" -its the first option, do this before you try anything with the dev server,

8. Now set a breakpoint etc in the code editor.

9 Hit the server with a web request and see the debugger stop and code highlighed in the editor.

If you don't follow the order - connect to server before running a web request things won't work.
It obviously needs lots of work to ensure more reliable startup, but once running works well, when stopped you can also open up the debuggers interactive shell.

Hope this helps someone

Cheers

Tim


timh

unread,
Mar 25, 2013, 11:18:14 AM3/25/13
to google-a...@googlegroups.com
OOps

In between steps 4 and 5, your app needs the following lines added some where near the top before your handler.

if hasattr(sys,'debugger_control'):
   sys.debugger_control.set_traceable()

Cristian Perez

unread,
Jul 30, 2013, 8:04:33 AM7/30/13
to google-a...@googlegroups.com
Any way of doing this but for Visual Studio? The debugger doesn't work with the new dev server...

timh

unread,
Jul 31, 2013, 2:45:26 AM7/31/13
to google-a...@googlegroups.com
Don't know  _ i don't use visual studio nor know anything about its capability re debugging python.  You should also look at the new pre-release SDK that supposedly fixes debugging for normal python debug environments,

T

Cristian Perez

unread,
Aug 1, 2013, 10:36:07 AM8/1/13
to google-a...@googlegroups.com
Hi,
 
Thanks for your message, I wasn’t even aware of the new pre-release SDK. I tried using the 1.8.3 pre-release but unfortunately breakpoints are still not working on Visual Studio :(
--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/-m00Qz4Vc7U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

timh

unread,
Aug 1, 2013, 8:57:17 PM8/1/13
to google-a...@googlegroups.com
Does breakpoints in visual studio work with python ?

Whatever you are debugging with in appengine it needs to be able to run under control of the appengine server.  So I doubt visual studio could work, but thats just a guess.

T

Cristian Perez

unread,
Aug 1, 2013, 9:05:55 PM8/1/13
to google-a...@googlegroups.com
Yes, breakpoints work perfectly with any regular Python app, and they also work with the old_dev_appserver of GAE. It's just with the new dev_appserver that it doesn't work. Of course, I'm using Python Tools for Visual Studio.
Reply all
Reply to author
Forward
0 new messages