Debugger in Python 3

173 views
Skip to first unread message

Sajal Gupta

unread,
Jan 8, 2022, 4:17:30 AM1/8/22
to Google App Engine
Hello,

I am trying to use debugger in python 3 in localhost - using dev_appserver. While I find documentation for python debugger usage in python 2.7 documentation, there is no similar section for python 3.



IDE's own debugger doesn't seem to work - I am using pycharm. Trying to use it gives the following error:
===========
/usr/bin/python2.7 "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 57002 --file /Users/sajal/google-cloud-sdk/bin/dev_appserver.py --runtime_python_path=/usr/bin/python3 --support_datastore_emulator=yes 
Connected to pydev debugger (build 213.6461.77)
ERROR: (dev_appserver) python2: command not found

Process finished with exit code 1
============

Could you please advise.

Thank you.

Sajal

wesley chun

unread,
Jan 8, 2022, 3:04:14 PM1/8/22
to google-a...@googlegroups.com
Hi, there are several issues at play here:

1. missing pdb section in the 3.x docs: this section may be missing possibly because it doesn't work in Python 3 or hasn't been tested or validated. The best thing to do here is to go to the Python 3 page you linked to, scroll down to the bottom, and click the blue "Send feedback" button, then specify the Python 2 page PDB section link like you did in your email and ask why this section is missing from *this* (Python 3) page.

2. dev_appserver.py running on Python 3 still requires the presence of a 2.7 interpreter: Look specifically at the blue sidebar on this page: https://cloud.google.com/appengine/docs/standard/python3/tools/using-local-server#running_the_local_development_server  which tells you how to specify the location of your Python 3 interpreter. While there is an internal bug created against removing final 2.x dependencies (for a purely 3.x version), I don't see an equivalent external bug for an App Engine dev_appserver issue yet, so if you want there to be a public record tracking this work, please file a new bug in that same component.

Depending on how you feel, you can take either (or both) of the above actions.

Best regards,
--Wesley

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"A computer never does what you want... only what you tell it."
    wesley chun :: @wescpy :: Software Architect & Engineer
    Developer Advocate at Google by day; at night: Core Python



--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/17f597c9-ce21-4a28-a6d7-bf8e26b5d935n%40googlegroups.com.

Sajal Gupta

unread,
Jan 11, 2022, 1:23:06 AM1/11/22
to Google App Engine
Thank you. I have done both.

Regards

Reply all
Reply to author
Forward
0 new messages