mfussenegger / nvim-dap

Debug Adapter Protocol client implementation for Neovim
GNU General Public License v3.0
5.47k stars 194 forks source link

Feature Request: Run Configurations #1026

Closed iworkinpixels closed 1 year ago

iworkinpixels commented 1 year ago

Problem Statement

I'd love it if nvim-dap supported some sort of run configuration, similar to PyCharm's or VSCode's, which would allow me to save a json or yaml file somewhere with the task(s) to run and then debug while running through those tasks.

Possible Solutions

I would use the feature by saving a run configuration file (preferably json, but yaml works too) somewhere, and choosing that config from some new input in the DAP UI, and then hitting run as normal on the DAP. Then I could debug using my existing breakpoints, and otherwise do everything else exactly as I currently do with nvim-dap.

Considered Alternatives

I haven't found any plugins that do anything like this, but for anyone familiar with PyCharm, I would like a similar workflow of setting a json configuration object, then in my DAP UI I should be able to choose which configuration I would like to run, and be able to debug during that run, unlike task runners which don't run interactively.

mfussenegger commented 1 year ago

Isn't this covered by the launch.json support? See :help dap-launch.json

iworkinpixels commented 1 year ago

It is for launch.json, but I was wondering if there was/requesting that there be a more generalizable solution that I could use to make the PyCharm configs work, since my work uses PyCharm and not VSCode.

mfussenegger commented 1 year ago

I don't intend to add a second file format out of the box but it would be possibly to create a plugin that reads PyCharm config files (which are in xml afaik) and creates configuration entries. Similar to how the vscode launch.json support works.