Middleware for spm debug, support connect, express and koa.