mfussenegger / nvim-dap

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

Terminal cmd would not be called upon restarting or re running the session #1092

Closed asmodeus812 closed 7 months ago

asmodeus812 commented 7 months ago

Debug adapter definition and debug configuration

The configuration does not really matter as long as it is supporting the integrated terminal option, can repro with c and cpp configurations too.

        configurations = {
            default_launch = {
                type = "java",
                request = "launch",
                cwd = "${workspaceFolder}",
                console = "integratedTerminal",
                name = "Default launch (java)",
            },
        },

Debug adapter version

master

Steps to Reproduce

  1. Start a new debug session
  2. Have some output show in the terminal
  3. Stop or kill the session or simply continue until the process terminates
  4. Delete the terminal buffer with bwipeout! or bd! or with the nvim api.
  5. ls! - the terminal buffer is wiped
  6. Re-start the previous session
  7. ls! - the terminal buffer is re-created (somehow) but the terminal win_cmd is never called again or re-run again.

Expected Result

The terminal command should be re-run, the terminal buffer should be cleaned up correctly, and possibly let the user control how to delete the buffer i.e introduce a new property in the config which similarly to the cmd, is responsible for cleaning up the terminal buffer or / and window.

Actual Result

The terminal win_cmd is not run again, the buffer is re-created, somehow but not shown (looking at ls! i can see it is there, with a new id/handle)

mfussenegger commented 7 months ago

Works fine for me. If you're using nvim-dap-ui that's probably why it's not getting called again. It takes control of the window creation.