Closed romanchyla closed 10 years ago
Originally on 2011-04-04
Instead of creating a new subdirectory in modules
, please move the
remote_debugger
files into miscutil
, where smaller utilities like
that usually live. I planned to move the files during merging when I
looked at this branch several months ago, but I have not got to it
yet, so it would be great if you can do it yourself.
Note that in its current state, the branch does not work, since the
file webinterface_handler_wsgi
contains unresolved merge conflicts,
see git grep '>>>>>'
. So this is to be amended.
While doing so, please squash everything together in order to avoid
unnecessary intermediate commits, and please fix cosmetics such as
add copyright headers, fix CR/LF, fix file permissions, remove
unnecessary remote_debugger.py.orig
file, etc.
BTW, the file remote_wsgi_reload
may be better called
remote_debugger_wsgi_reloader
so that the files share the same
namespace-like prefix for easier orientation, or else it may be moved
to the WebStyle module and live under a name like
webinterface_handler_wsgi_reloader
perhaps. (Also, please
acknowledge upstream source in the global THANKS file; we could/should
also commit it under upstream author's name, if possible, like we did
for pep8 or logicutils.)
Originally on 2011-04-05
Thanks Tibor, the commit is ready in the remote-debugger branch
https://github.com/romanchyla/invenio/tree/remote-debugger
Please note it is 'remote-debugger' and not the (old) 'remote-debugging' branch
Originally on 2011-04-12
Thanks for the squash. There remained some cosmetics, so I have
replaced CDS Invenio by Invenio, fixed copyright years, deleted
trailing whitespace, replaced CRLF by Unix standards, removed
CFG_REMOTE_DEBUGGER
stuff from invenio.conf
(it was ignored, and
more variables would have to be put there like the winpdb password in
order to be complete, and inveniocfg would have to be updated for the
pathname list treatment, etc, so I think it is better to have nothing
in invenio.conf
at the moment rather than being incomplete, since
developers can edit the concerned remote debugger file directly
anyway.) I'll send you my updates separately by mail.
However, winpdb does not seem to be able to attach for me when using
debug=1
. While if I use our "traditional" approach:
import rpdb2; rpdb2.start_embedded_debugger('password')
as outlined in [[https://twiki.cern.ch/twiki/bin/view/CDS/PythonAndApache#4_Debugging_mod_python_apps]], then things work fine and winpdb attaches fine.
I have not tried to debug why it does not work for me. Does debug=1
work for you out of the box? If yes, then can we have a look
together?
Originally on 2011-04-15
The new changes are inside: github/remote-debugger-2
Originally on 2011-06-20
Thanks, I have amended remote_debugger_config.py
to disable the debugger by default, amended webdoc documentation and fixed markup and links, and we are good to go.
BTW, the enable/disable bit can be also hooked upon CFG_DEVEL_SITE, we could put this in a try-except statement in order not to create Invenio dependency, since IIRC you use these files for "standalone" purposes too, unless I'm wrong.(?)
Originally on 2011-06-20
Replying to [comment:6 simko]:
BTW, the enable/disable bit can be also hooked upon CFG_DEVEL_SITE
Done. I have also amended webinterface_handler.py
so that debug=0
would work. (But I have not played with prettifying the behaviour in case of debug=999
. We should probably switch to using alphanumeric identifiers anyway, debug=winpdb
, debug=pydev
, etc.)
Originally by Roman Chyla roman.chyla@cern.ch on 2011-06-20
In [dda6b62b1f37ed364e8f1e19ab1537fdd1e808a2]:
#CommitTicketReference repository="" revision="dda6b62b1f37ed364e8f1e19ab1537fdd1e808a2"
remote debugger: initial release
- A new module for (remote) debugging of Apache WSGI applications.
(closes #570)
Originally on 2011-03-30
The module that brings remote debugging is still to be integrated into the master.
http://invenio-software.org/wiki/Development/RemoteDebugging
It is ready:
https://github.com/romanchyla/invenio/tree/remote-debugging