I can run the appapp2 application for Google App Engine using Python Tools for Visual Studio 2012 without problems after the following this tutorial and even go through the server initialization code, but I can not get it to break when receiving or sending tags when the website loads, similarly what is shown in this video using the main() method. When I pause the debugger, it always ends in the following endless loop in the wsgi_server.py file:
def _loop_forever(self): while True: self._select() def _select(self): with self._lock: fds = self._file_descriptors fd_to_callback = self._file_descriptor_to_callback if fds: if _HAS_POLL: # With 100 file descriptors, it is approximately 5x slower to # recreate and reinitialize the Poll object on every call to _select # rather reuse one. But the absolute cost of contruction, # initialization and calling poll(0) is ~25us so code simplicity # wins. poll = select.poll() for fd in fds: poll.register(fd, select.POLLIN) ready_file_descriptors = [fd for fd, _ in poll.poll(1)] else: ready_file_descriptors, _, _ = select.select(fds, [], [], 1) for fd in ready_file_descriptors: fd_to_callback[fd]() else: # select([], [], [], 1) is not supported on Windows. time.sleep(1)
Is it possible to set breakpoints in the webapp2 application of the Google App Engine application in PTVS that start when the page loads from localhost?
Edit: using cprcrack settings, I was able to successfully launch GAE, but when I load the main page, I get an error
Traceback (most recent call last): File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3003, in _HandleRequest self._Dispatch(dispatcher, self.rfile, outfile, env_dict) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2862, in _Dispatch base_env_dict=env_dict) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 719, in Dispatch base_env_dict=base_env_dict) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1797, in Dispatch self._module_dict) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1648, in ExecuteCGI app_log_handler = app_logging.AppLogsHandler() File "C:\Python\lib\logging\__init__.py", line 660, in __init__ _addHandlerRef(self) File "C:\Python\lib\logging\__init__.py", line 639, in _addHandlerRef _releaseLock() File "C:\Python\lib\logging\__init__.py", line 224, in _releaseLock _lock.release() File "C:\Python\lib\threading.py", line 138, in release self.__count = count = self.__count - 1 File "C:\Python\lib\threading.py", line 138, in release self.__count = count = self.__count - 1 File "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.0\visualstudio_py_debugger.py", line 557, in trace_func return self._events[event](frame, arg) File "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.0\visualstudio_py_debugger.py", line 650, in handle_line if filename == frame.f_code.co_filename or (not bound and filename_is_same(filename, frame.f_code.co_filename)): File "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.0\visualstudio_py_debugger.py", line 341, in filename_is_same import ntpath File "C:\Python\lib\ntpath.py", line 8, in <module> import os File "C:\Python\lib\os.py", line 120, in <module> from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep, ImportError: cannot import name curdir
Did this error happen because I need to rollback to Python 2.5 to use the old dev_appserver?