{"id":13897605,"url":"https://github.com/jdugan6240/kak-dap","last_synced_at":"2025-07-17T14:32:26.204Z","repository":{"id":44556034,"uuid":"293102841","full_name":"jdugan6240/kak-dap","owner":"jdugan6240","description":"A debug adapter protocol client for Kakoune.","archived":true,"fork":false,"pushed_at":"2024-05-04T02:36:39.000Z","size":252,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-25T03:32:50.395Z","etag":null,"topics":["debug-adapter-protocol","debugger","debugging","kakoune","plugin"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdugan6240.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-05T15:29:41.000Z","updated_at":"2024-09-19T16:13:02.000Z","dependencies_parsed_at":"2023-09-25T02:45:49.818Z","dependency_job_id":null,"html_url":"https://github.com/jdugan6240/kak-dap","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jdugan6240/kak-dap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdugan6240%2Fkak-dap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdugan6240%2Fkak-dap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdugan6240%2Fkak-dap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdugan6240%2Fkak-dap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdugan6240","download_url":"https://codeload.github.com/jdugan6240/kak-dap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdugan6240%2Fkak-dap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265616816,"owners_count":23798903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debug-adapter-protocol","debugger","debugging","kakoune","plugin"],"created_at":"2024-08-06T18:03:44.241Z","updated_at":"2025-07-17T14:32:25.842Z","avatar_url":"https://github.com/jdugan6240.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# NO LONGER MAINTAINED\n\n`kak-dap` was a fun experiment to test how well a debug UI could be mimicked with Kakoune buffers, but its design is sadly\nflawed. A replacement plugin is in development at https://codeberg.org/jdugan6240/kak-debug.\n\n\n# Kakoune Debug Adapter Protocol Client\n\nkak-dap is a [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/) client for [Kakoune](http://kakoune.org) implemented in [Rust](https://www.rust-lang.org).\nThis allows Kakoune to support debugging in a variety of different languages, provided the language has a debug adapter implementation.\n\n## Features\n\n- Launch debug adapter\n- Launch debuggee in external terminal (Kakoune doesn't have an integrated terminal)\n- Stop at breakpoints\n- Continue/step/next\n- Call stack display (current thread only)\n- Heirarchical variable display\n- Arbitrary expression evaluation\n\n## Install\n\n### Requirements\n\n- Rust/Cargo\n- Ensure cargo packages are in your path. (eg: `PATH=$HOME/.cargo/bin:$PATH`)\n\n### Pre-built Binary\n\nIf using a binary distribution of `kak-dap`, place the following in your kakrc:\n\n```\neval %sh{kak-dap --kakoune -s $kak_session}\n```\n\n### Plug.kak\n\nIf using `plug.kak` as your plugin manager, add the following to your kakrc:\n\n```\nplug \"https://codeberg.org/jdugan6240/kak-dap\" do %{\n  cargo install --locked --force --path .\n}\n```\n\n### kak-bundle\n\nIf using `kak-bundle` as your plugin manager, add the following to your kakrc:\n\n```\nbundle \"https://codeberg.org/jdugan6240/kak-dap\" %{\n  cd ${kak_opt_bundle_path}/kak-dap\n  cargo install --locked --force --path .\n}\n```\n\n### Manual\n\nIf not using a plugin manager, clone the repository anywhere on your system:\n\n```\ngit clone https://codeberg.org/jdugan6240/kak-dap\ncd \u003crepository_dir\u003e\ncargo install --locked --force --path .\n```\n\nwhere \u003crepository_dir\u003e is the directory you cloned the repository to.\n\nThen, add the following to your kakrc:\n\n```\nsource \u003crepository_dir\u003e/rc/kak-dap.kak\n```\n\nwhere, once again, \u003crepository_dir\u003e is the directory you cloned the repository to.\n\n## Debug Adapters\n\n`kak-dap` doesn't manage installation of debug adapters, so you'll need to install\nthem yourself. Examples of installing adapters that `kak-dap` has been tested with\nare in the [Debug Adapter Installation](https://codeberg.org/jdugan6240/kak-dap/wiki/Debug-Adapter-Installation) wiki page.\n\n## Usage\n\nAn (old) demo of `kak-dap` can be found here: [![asciicast](https://asciinema.org/a/fjU1GBrXSxplfP6lEo7cqYcj9.svg)](https://asciinema.org/a/fjU1GBrXSxplfP6lEo7cqYcj9)\n\n### .kak-dap.json File\n\n`kak-dap` requires a file to be present in your project's root directory, named\n`.kak-dap.json`. This is a standard JSON file, with support for comments for\nconvenience. In general, it will look like the following:\n\n```\n{\n  // The binary run to start the debug adapter\n  \"adapter\": \"adapter\",\n\n  // The arguments to the debug adapter\n  \"adapter_args\": [\"args\"],\n\n  // The adapter ID. Needed by some debug adapters.\n  \"adapterID\": \"mydbg\",\n\n  // The arguments sent to the \"launch\" request\n  \"launch_args\": {\n    // This will depend on the debug adapter used.\n  }\n}\n```\n\nThe \"adapter\", \"adapter_args\", \"adapterID\", and \"launch_args\" values must be present.\n\nSince many debug adapters are Visual Studio Code extensions, it's not always obvious\nwhat to put in this file. Let's take this VSCode `launch.json` file as an example:\n\n```\n{\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"name\": \"Python: Current File\",\n            \"type\": \"python\",\n            \"request\": \"launch\",\n            \"program\": \"${file}\",\n            \"console\": \"integratedTerminal\"\n        }\n    ]\n}\n```\n\nAll we need to look at here is the first {} block under \"configurations\". Taking out\nthe \"name\", \"type\", and \"request\" values, the remainder of this block can be placed\nunder \"launch_args\" in our `.kak-dap.json` file. In other words, the equivalent\n`.kak-dap.json` file for the above `launch.json` file is:\n\n```\n{\n  \"adapter\": \"python\",\n  \"adapter_args\": [\"path_to_debugpy_adapter\"],\n  \"adapterID\": \"python\",\n  \"launch_args\": {\n    \"program\": \"path_to_file.py\",\n    \"console\": \"integratedTerminal\"\n  }\n}\n```\n\nYou may notice that the \"${file}\" expansion couldn't be translated over. This is\nbecause `kak-dap` only supports the following expansions:\n\n```\n${CUR_DIR} - The directory containing the `.kak-dap.json` file.\n${USER} - The current username.\n${HOME} - The current user's home directory.\n$$ - A literal dollar.\n```\n\nIf this is still confusing, examples of `.kak-dap.json` file configurations for\nvarious debug adapters can be found in the [Debug Adapter Installation](https://codeberg.org/jdugan6240/kak-dap/wiki/Debug-Adapter-Installation) wiki page.\n\n### Setting breakpoints\n\nIn the source file, run the `dap-toggle-breakpoint` command to toggle a breakpoint on\nthe given line.\n\n### Starting and interacting with the debug session\n\nOnce you're ready to begin debugging, run the following command:\n\n```\ndap-start\n```\n\nIf configured correctly, the debug adapter will launch and the debug session will begin.\nAt every stopping point (usually breakpoints), the \"code window\" will show the current\nline. At this point, the following commands are available:\n\n```\ndap-continue - Continue running from the current point, or start debug session if one isn't already running\ndap-next - Execute and stop at the next line\ndap-step-in - Step into a function/method\ndap-step-out - Step out (return from) a function/method\ndap-evaluate \u003cexpression\u003e - Evaluate an arbitrary expression and show the result\n```\n\nIn addition, the stacktrace and variables buffers will be populated with the current\nstack trace and a variable heirarchy, respectively. In the variables buffer, some\nvariables are expandable, and can be expanded by pressing Enter.\n\nWhen you're finished debugging, run the following command to stop debugging:\n\n```\ndap-stop\n```\n\n### Custom user mode\n\nA `kak-dap` user mode is provided with mappings to several commands. You may map this to a key of your liking, below we're using `x`:\n\n```\nmap global user x -docstring 'dap' ': enter-user-mode dap\u003cret\u003e'\n```\n\n## Troubleshooting\n\n`kak-dap` isn't perfect, and may fail from time to time. In case this happens, `kak-dap`'s\nlogging can be enabled by inserting the following command in your kakrc:\n\n```\nset global dap_cmd \"kak-dap -s %val{session} --log /tmp/kak-dap.log -vvvv\"\n```\n\nThis will cause `kak-dap` to create a debug log in the `/tmp/kak-dap.log` file. If this isn't\nenough to diagnose the problem, please don't hesitate to raise an issue.\n\n## Not-so-FAQ\n\nQ: Does it work?\n\nA: Yes, but it's rather unpolished and limited at the moment.\n\nQ: What's the point of this? kakoune-gdb and kakoune-dbgp exist.\n\nA: kakoune-gdb is limited to languages supported by gdb - that is, C languages and rust.\nkakoune-dbgp also only supports languages currently supported by the dbgp protocol, which\nis mainly PHP at the moment as far as I know. The debug adapter protocol is much more widely\nsupported, which allows for more languages to be debugged.\n\n## License\n\nkak-dap is licensed under the BSD 0-Clause License.\n\n## Contributors\n\nJames Dugan (https://codeberg.org/jdugan6240)\n\nin0ni (https://github.com/in0ni)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdugan6240%2Fkak-dap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdugan6240%2Fkak-dap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdugan6240%2Fkak-dap/lists"}