Giter Club home page Giter Club logo

nvim-dap's Introduction

DAP (Debug Adapter Protocol)

nvim-dap is a Debug Adapter Protocol client implementation for Neovim (>= 0.5). nvim-dap allows you to:

  • Launch an application to debug
  • Attach to running applications and debug them
  • Set breakpoints and step through code
  • Inspect the state of the application

demo

Installation

  • Requires Neovim (>= 0.5)
  • nvim-dap is a plugin. Install it like any other Neovim plugin.
    • If using vim-plug: Plug 'mfussenegger/nvim-dap'
    • If using packer.nvim: use 'mfussenegger/nvim-dap'
  • Generate the documentation for nvim-dap using :helptags ALL or :helptags <PATH-TO-PLUGIN/doc/>

You'll need to install and configure a debug adapter per language. See

Usage

A typical debug flow consists of:

  • Setting breakpoints via :lua require'dap'.toggle_breakpoint().
  • Launching debug sessions and resuming execution via :lua require'dap'.continue().
  • Stepping through code via :lua require'dap'.step_over() and :lua require'dap'.step_into().
  • Inspecting the state via the built-in REPL: :lua require'dap'.repl.open() or using the widget UI (:help dap-widgets)

See :help dap.txt, :help dap-mapping and :help dap-api.

Supported languages

In theory all of the languages for which a debug adapter exists should be supported.

The Wiki is community maintained. If you got an adapter working that isn't listed yet, please extend the Wiki. If you struggle getting an adapter working, please create an issue.

Goals

  • Have a basic debugger in Neovim.

  • Extensibility and double as a DAP client library. This allows other plugins to extend the debugging experience. Either by improving the UI or by making it easier to debug parts of an application.

Extensions

All known extensions are listed in the Wiki. The wiki is community maintained. Please add new extensions if you built one or if you discovered one that's not listed.

Non-Goals

  • Debug adapter installations are out of scope. It's not the business of an editor plugin to re-invent a package manager. Use your system package manager. Use Nix. Use Ansible. If you disagree, check out DAPInstall.

  • Vim support. It's not going to happen. Use vimspector instead.

Alternatives

Features

  • launch debug adapter
  • attach to debug adapter
  • toggle breakpoints
  • breakpoints with conditions
  • logpoints
  • set exception breakpoints
  • step over, step into, step out
  • step back, reverse continue
  • Goto
  • restart
  • stop
  • pause
  • evaluate expressions
  • REPL (incl. commands to show threads, frames and scopes)

nvim-dap's People

Contributors

amenonsen avatar david-kunz avatar dchusovitin avatar jbyuki avatar kconston avatar mfussenegger avatar ovikk13 avatar patoconnor43 avatar pretentious7 avatar rcarriga avatar shatur avatar thehamsta avatar weihanglo avatar y1rn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.