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

已查看 458 次
跳至第一个未读帖子

timh

未读,
2013年3月25日 06:30:052013/3/25
收件人 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

未读,
2013年3月25日 11:18:142013/3/25
收件人 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

未读,
2013年7月30日 08:04:332013/7/30
收件人 google-a...@googlegroups.com
Any way of doing this but for Visual Studio? The debugger doesn't work with the new dev server...

timh

未读,
2013年7月31日 02:45:262013/7/31
收件人 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

未读,
2013年8月1日 10:36:072013/8/1
收件人 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

未读,
2013年8月1日 20:57:172013/8/1
收件人 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

未读,
2013年8月1日 21:05:552013/8/1
收件人 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.
回复全部
回复作者
转发
0 个新帖子