Hi Christian,

thanks for the hint. Using only one thread works fine for all sources 
inside of Trac Core. But when I try to debug plugin code with PyDev[1] it 
calls the interface, but not the plugin code.

For example: I currently extend LogViewerPlugin [2]; this plugin implements 
IAdminPanelProvider. When I set an breakpoint at method 
"render_admin_panel" in plugin code PyDev won't enter it. When I set the 
breakpoint in trac/admin/web_ui.py inside method 
"AdminModule.process_request" it will enter the debug mode. Strangely I see 
the variables of the plugin in View "Variables", when it enters 
"provider.render_admin_panel(req, cat_id, panel_id, path_info)", but the 
Debugger only shows class "AdminModule(Component)".

I already tried to add "Project Reference" and "External > Source Folder" 
to project properties, but nothing worked. Do you have any idea how this 
could work?

[1] PyDev: http://pydev.org/, I am using version PyDev Version 
2.6.0.2012062818 (in Eclipse SDK, Version: 4.2.0)
[2] LogViewerPlugin: http://trac-hacks.org/wiki/LogViewerPlugin

Thank you in advance,
Franz


On Wednesday, September 2, 2009 5:12:01 PM UTC+2, cboos wrote:
>
> anatoly techtonik wrote:
> > Hello,
> >
> > I've setup Trac environment as described on TracDev/
> > DevelopmentEnvironmentSetup pages (valuable info indeed), but now I
> > need to get to the source of mysterious Error
> > (Error when calling the metaclass bases function() argument 1 must be
> > code, not str)
> >
> > Logging console in DEBUG mode didn't provide enough info to pinpoint
> > the problem, so I've tried PDB to go step-by-step until the offending
> > line, but PDB has one big flaw - it doesn't understand threads. 
>
> Well, then just don't use threads. Assuming you're using tracd, simply 
> remove the ThreadingMixIn from the TracHTTPServer.
>
> -- Christian
>
> Index: trac/web/standalone.py
> ===================================================================
> --- trac/web/standalone.py      (revision 8561)
> +++ trac/web/standalone.py      (working copy)
> @@ -100,7 +100,7 @@
>          return self.application(environ, start_response)
>
>
> -class TracHTTPServer(ThreadingMixIn, WSGIServer):
> +class TracHTTPServer(WSGIServer):
>
>      def __init__(self, server_address, application, env_parent_dir, 
> env_paths,
>                   use_http_11=False):
>
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to