Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

daptadap

CI code coverage package version R package license MIT

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.

Scope

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

Installation

remotes::install_github("ilyaZar/daptadap")

For local development, install the checkout instead:

pak::pak(".")

Basic Flow

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.

Public API

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

Status

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.

License

MIT. See LICENSE.md.

About

A small Debug Adapter Protocol helper for neovim-driven R console debugging.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages