| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
_ _ _ _
| | | | | | (_)
__| | ___| |__ _ _ __ _ ___| |_ _ __ _ _ __ __ _
/ _` |/ _ \ '_ \| | | |/ _` / __| __| '__| | '_ \ / _` |
| (_| | __/ |_) | |_| | (_| \__ \ |_| | | | | | | (_| |
\__,_|\___|_.__/ \__,_|\__, |___/\__|_| |_|_| |_|\__, |
__/ | __/ |
|___/ |___/
debugstring aims to automate standard debugging operations (e.g., segfaults). It does that by facilitating the ubiquitous printf()-debugging i.e., scatter logging statements around the various code snippets that you want to test.
Currently the following languages are supported. First column corresponds to the standard debugging string while the second to the case of debugging for a specific variable.
| Lang | Debug String | Debug Variable |
|---|---|---|
| Arduino | ✔️ | ✔️ |
| Awk | ❌ | ❌ |
| C | ✔️ | ✔️ |
| C# | ✔️ | ✔️ |
| C++ | ✔️ | ✔️ |
| CMake | ✔️ | ✔️ |
| D | ❌ | ❌ |
| Dockerfile | ✔️ | ✔️ |
| Fish-Shell | ✔️ | ✔️ |
| Fortran | ✔️ | ✔️ |
| Go | ✔️ | ✔️ |
| Haskell | ✔️ | ✔️ |
| Java | ✔️ | ✔️ |
| Javascript | ✔️ | ✔️ |
| Julia | ❌ | ❌ |
| Lua | ✔️ | ✔️ |
| Makefile | ✔️ | ✔️ |
| Matlab | ❌ | ❌ |
| PHP | ✔️ | ✔️ |
| Perl | ❌ | ❌ |
| Python | ✔️ | ✔️ |
| R | ✔️ | ✔️ |
| Ruby | ✔️ | ✔️ |
| Rust | ✔️ | ✔️ |
| Scala | ❌ | ❌ |
| Shell | ✔️ | ✔️ |
| Swift | ❌ | ❌ |
| Typescript | ✔️ | ✔️ |
| Vim | ✔️ | ✔️ |
| Visual Basic | ❌ | ❌ |
| Zsh | ✔️ | ✔️ |
For a more detailed description of debugstring check doc/debugstring.txt
Use the mappings of your choice to place unique logging directives during debugging times.
nnoremap <your-key-combination> <Plug>DumpDebugString
nnoremap <a-second-key-combination> <Plug>DumpDebugStringExpr
nnoremap <a-third-key-combination> <Plug>DumpDebugStringCexprDefault mappings are: <Leader>ds, <Leader>dS, <Leader>DS respectively.
An example of using it in a C++ file is given below:
// Debug String
std::cout << "[a.c:4] DEBUGGING STRING ==> " << 0 << std::endl;
// Debug Variable
std::cout << "[a.c:4] a_variable: " << a_variable << std::endl;| Plugin manager | How to install |
|---|---|
| Dein | call dein#add('bergercookie/vim-debugstring') |
| minpac | call minpac#add('bergercookie/vim-debugstring') |
| Pathogen | git clone https://github.com/bergercookie/vim-debugstring.git ~/.vim/bundle/vim-debugstring |
| Plug | Plug 'bergercookie/vim-debugstring' |
| Vundle | Plugin 'bergercookie/vim-debugstring' |
| manual | copy all of the files into your .vim directory (or ~/.config/nvim if you're using neovim) |
debugstring depends on the following vim plugins:
In case you want to contribute on a certain feature/fix, don't hesitate to discuss about it in the Github issues or to implement it and make a PR.
Current plugin is distributed under the same terms as Vim itself. See the LICENSE file
In case you like the plugin, you might as well star it on Github or rate it on vim.org Also feel free to check my other plugins
This mostly comprises a list of stuff I want to keep track of when developing this or other vim plugins
Use vimdoc to generate documentation from the vim docstring (instead of manually updating the .txt file). See the misc/build_doc for more on how this is done.
Use vader for unittesting. Use test/run-tests.sh to run them:
vim -Nu test/vimrc :set rtp+=vader.vim/plugin :set rtp+=vim-repeat/autoload :Vader test/*
| Back | FazBrowse Home | New Git URL |