On Wed, 13 Apr 2011, Roman Chyla wrote:
> The problem with the debugger might be due to the removed config
> variable. It is in fact used. When run inside wsgi the conffig has
> preference over the local variable. This piece of code is there
>
> {{{
> if config.CFG_REMOTE_DEBUGGER_WSGI_RELOAD != None:
> CFG_REMOTE_DEBUGGER_WSGI_RELOAD = config.CFG_REMOTE_DEBUGGER_WSGI_RELOAD
> if config.CFG_REMOTE_DEBUGGER_ENABLED != None:
> CFG_REMOTE_DEBUGGER_ENABLED = config.CFG_REMOTE_DEBUGGER_ENABLED
> }}}
>
> So I think if you removed the CFG_REMOTE_DEBUGGER_ENABLED from the
> config then the debugger module import fails (the error log should
> show the error) and therefore the debugging does not work.
Oh, I see. Actually before removing the two variables from the
invenio.conf file, I tried the branch with them, but I got into another
problem:
Exception: Cannot start the debugger <lambda>, please read
instructions inside remote_debugger module. 'NoneType' object has no
attribute 'decode'
I have not investigated at the time and continued with removing the
variables...
I have now commented out the above four lines as you suggested, and I
have debugged the above decode error which was easy to fix:
| @@ -295,7 +295,7 @@ def start_embedded_winpdb_debugger(passwd=None):
| Change the call to suit your needs
| """
| p = passwd or CFG_REMOTE_DEBUGGER_WINPDB_PASSWORD
| - rpdb2.start_embedded_debugger(passwd)
| + rpdb2.start_embedded_debugger(p)
After fixing both these issues, winpdb works well for me, in mode
debug=1 as well as in mode debug=2. So things are ready.
> we could remove the above two lines from the module and it will be
> working again. But they might be useful...
Yes, they are useful, but then we should move also the other interesting
variables such as winpdb password there... It would not be nice to move
only some parts there. I'd propose to simply create a new internal file
`remote_debugger_config.py' like with other modules and people will set
their wanted values there. After all, this is for developers, so there
is no need to be able to set stuff in the classic invenio.conf manner,
people can edit `remote_debugger_config.py' directly. If you agree,
I'll move all the remote debugger configuration there, retest with
winpdb, and send you the final version for testing with Eclipse. Please
let me know what you think.
Best regards
--
Tibor Simko