3. Plugins for debugging
The actual writing of code is only one small part
of the development process.
There are already a lot of great blog posts on
plugins for editing, so I thought I’d focus on a
different topic: debugging.
4. Problem: stack traces suck
You’re happily browsing your logs, when all of a
sudden, you see a stack trace! There are a few
problems:
● There’s no context around the stack trace
● When I see a problem, I want to go in and fix
it
5. Solution: Unstack!
Highlight a stack trace in vim and hit “,s”
This opens a new tab with one vsplit per level
of the stack trace, with the lines highlighted in
red.
From here you can see the full context and
edit/save the files if you wish.
8. Problem: viewing logs
Server logs get bogged down with a million
debug statements
They become hard to navigate and it’s hard to
know the context of a log message
9. Solution: smartlog!
● Python and vim components
● Log function calls with a decorator
● Syntax highlighting and code folding
● More nifty vim functions
10.
11. What I want:
● Profiler that logs function enter/exit and
optionally every line executed, maybe types?
● Logs should be in an open machine-
readable format
● Editor plugins to replay execution
Interested? Talk to me and let’s build it!