Neovim for Beginners — Print Debugging
We talked about debugging in several articles in this series. Sometimes debugging can be simple. E.g., we may just want to print out some variables for inspection.
In this article, let’s explore plugins that make print debugging easier for us.
This article is part of the Neovim for Beginners series.
The Neovim configuration files are available in this repository.
Getting Started
Using print statements for debugging is simple and yet controversial. Writing good unit tests, practicing test-driven development (TDD), using proper logging, and test automation are better software engineering practices.
However, this simple debugging technique could be useful, e.g., when we are doing rapid prototyping or competitive programming. We will check out several plugins that make the injection and removal of these print statements easier.
refactoring.nvim
We talked about the refactoring.nvim
plugin in the refactoring article. Besides refactoring, this plugin also provides features for print debugging.
printf
— Automated insertion of print statement to mark the calling of…