ilyachur/cmake4vim

[SUGGESTION] :CMakeRun / :CMakeDebug

silvioprog opened this issue · 3 comments

Hello.

Firstly, thanks for this incredible VIM plugin! I'm enjoying it a lot in nvim with LSP provided by Coc plugin. :-)

So, I have a suggestion for cmake4vim. It would be nice the following options:

:CMakeRun - runs the program selected by :CMakeSelectTarget. It compiles the program automatically if it is not compiled yet.
:CMakeDebug - it is similar to :CMakeRun, but allowing to debug the program.

Maybe the :packadd termdebug/:Termdebug and :Run could help to implement the suggested options: https://www.dannyadam.com/blog/2019/05/debugging-in-vim/.

Edit1:

It seems vimspector is a promising DAP plugin, maybe it could be used instead of :termdebug.

More info about the plugin (features, shortcuts etc.) and how to debug C applications using it.

Edit2:

In attachment a short video showing the vimspector debugging a small HTTP server in C.

Thank you!

dap

Why this issue was closed?

Hmm I hope PR #76 should add the opportunity to debug targets using the Vimspector

PR was merged. I hope the plugin should allow to run and debug your applications.