You can create a wsgi script shell and run it in the debugger. For instance:
import os import trac.web.main os.environ['TRAC_ENV'] = '/path/to/your/trac/env' application = trac.web.main.dispatch_request from flup.server.fcgi import WSGIServer server = WSGIServer(application, bindAddress=("127.0.0.1", 9000), ) server.run()
You run this script in a debugger, and you can use lighttpd as an interface for a web application with a trivial configuration like this:
server.document-root = "/path/to/your/trac/env" server.port = 1234 server.modules = ( "mod_fastcgi" ) server.pid-file = "/path/to/your/trac/env/httpd.pid" server.errorlog = "/path/to/your/trac/env/error.log" fastcgi.server = ( "/" => (( "host" => "127.0.0.1", "port" => 9000, "docroot" => "/", "check-local" => "disable", )) )
Just run the fcgi wsgi shell in the debugger, set breakpoints in your plugin and open a web page.
abbot source share