vscode-kotlin icon indicating copy to clipboard operation
vscode-kotlin copied to clipboard

Support no folder debugging

Open isidorn opened this issue 2 years ago • 2 comments

Hi VS Code PM here 👋

  1. Purple no folder VS Code -> create a new kotlin file
  2. Press F5 -> notice how we offer the user to download your extension 👏
  3. Now the user presses F5 again and wants to debug, but nothing happens since kotlin is not supporting single folder debugging

Easiest to do this is to have a dynamic resolveDebugConfiguartion that will provide a launch configuration on the fly. Example

Apart from that consider contributing to the Editor title area menu, such that a Play button would appear in the Editor Title area (picture below). Example how to do this https://github.com/microsoft/vscode-mock-debug/blob/main/package.json#L80

I think both of these are super important and would really love that we improve this experience 💯
Let me know if I can help somehow. I am also open to a quick 30 min meeting where we can discuss about the new cool VS Code debug features that kotlin could potentially adopt.

isidorn avatar Sep 24 '21 14:09 isidorn

Hi, thanks for the note.

Since this extension's debugger is just a thin wrapper around kotlin-debug-adapter, can we provide such a dynamic debug configuration on the DAP server side or do we need to do it on the VSCode side (in this repo)?

I agree that no-folder-debugging would be cool, but I can't make any promises on when I'll get around to implementing that.

fwcd avatar Sep 29 '21 13:09 fwcd

You can do this on the VS Code side (in this repo). A vscode extension implements the resolveDebugConfiguartion call. You can see more details in the example that I have linked. It would be pretty cool to have this, whenever you find time... Thanks 👏

isidorn avatar Sep 29 '21 15:09 isidorn