Skip to content

Instantly share code, notes, and snippets.

@RobinCPC
Last active December 12, 2023 20:08
Show Gist options
  • Save RobinCPC/228eceed32dea10f32e2b3d41ad930c8 to your computer and use it in GitHub Desktop.
Save RobinCPC/228eceed32dea10f32e2b3d41ad930c8 to your computer and use it in GitHub Desktop.
How to use GDB in Vim

How to use ConqueGDB in Vim

Install ConqueGDB in Vim

Debug C/C++:

  • Compiler your c/c++ code with -g flag. if not, gdb may not find symbol
  • Open your source file which one with main()
  • Insert following :ConqueGdbSplit executeFileName
  • In ConqueGdb, type run argument which follow executeFileName
  • Type b 34 to add breakpoint at line 34 in your source code
  • Type r to run program again, will stop if you set breakpoint
  • Type s to run step by step (as step-in )
  • Type c to continue

Example

    vim graph01.c
    # following commands are usedin Vim
    :ConqueGdbSplit graph01
    run gr01_test.in > out.txt or only run gr01_test.in
    b 37
    r
    s
    c

vim_gdb

@MihailNenahov
Copy link

is it necessarily, to install Vundle? what for we need to install this?

@RobinCPC
Copy link
Author

is it necessarily, to install Vundle? what for we need to install this?

Vundle is a vim plugin manager to help you management plugins in Vim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment