A small Debug Adapter Protocol helper for neovim-driven R console debugging.
daptadap runs inside an interactive R process and exposes DAP behavior for
the Neovim debugging workflow built around
R.nvim and
nvim-dap-r. It lets Neovim drive
breakpoints, stack frames, locals, evaluation, and stepping through R's
browser() machinery.
This package is intentionally narrow. The current target is the classic
R.nvim console workflow used by
nvim-dap-r.
The package owns the R-side helper:
- starts a local DAP socket from the R process
- writes connection metadata for the Neovim-side DAP client
- records DAP breakpoints
- sources R files with injected
browser()stops - reports stack frames, scopes, variables, and evaluated expressions
- forwards DAP stepping requests to the active R browser prompt
remotes::install_github("ilyaZar/daptadap")For local development, install the checkout instead:
pak::pak(".")In normal use, nvim-dap-r calls these functions from Neovim. A minimal manual
session looks like this:
library(daptadap)
metadata <- dap_start()
metadata
dap_debug_source("path/to/script.R")
dap_stop()dap_start() writes connection metadata so Neovim can attach a DAP client.
dap_debug_source() then sources a file while honoring breakpoints registered
from Neovim.
| Function | Purpose |
|---|---|
dap_start() |
Start the in-process DAP helper |
dap_stop() |
Stop the helper and remove connection state |
dap_pump() |
Process DAP requests at an R browser stop |
dap_debug_source() |
Source an R file with DAP breakpoints active |
daptadap is early-stage infrastructure for R debugging UX experiments. The
current behavior is roughly tested with fake DAP clients and interactive Neovim
workflows, but the DAP surface is deliberately limited to the features needed
by the current Neovim integration.
MIT. See LICENSE.md.