On Wed, Apr 13, 2011 at 12:00 PM, Tibor Simko <[email protected]> wrote: > 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)
oh, my bad, last minute change, sorry > > 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. ok > >> 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 There is a *slight* trade off -- the remote debugger might be useful for debugging console applications, when Invenio is not yet installed (in the source tree) -- I broke that option by including the invenio config, but by removing those 4 lines we moved it back to the previous state :))). I wasn't using this (console app debugging) functionality too often, but it is a possibility. So I am slightly in favour of one module, but I see the value of having the config separate (and with never Python versions we could use relative imports...). So yes, if you prefer the separate config, I we should do it. Cheers, Roman > 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 >
