mfussenegger / nvim-dap-python

An extension for nvim-dap, providing default configurations for python and methods to debug individual test methods or classes.
GNU General Public License v3.0
540 stars 48 forks source link

closing dap-terminal and relaunching file does not spawn dap-terminal #102

Closed Dmusulas closed 1 year ago

Dmusulas commented 1 year ago

I have encountered an issue where closing the dap-terminal (buffer where all program output is written) does not relaunch it afterward. The program is running, and breakpoints are working, but the output buffer is not visible.

Config

require('dap-python').setup('~/.virtualenvs/debugpy/bin/python')

Nothing else only some remaps.

Steps to reproduce

  1. Launch any python program
  2. Enter debugging mode with lua require'dap'.continue()
  3. Finish executing program
  4. Close dap-terminal with :q
  5. Enter debugging mode again with lua require'dap'.continue()

If I leave the dap-terminal open debugging session outputs everything correctly the second time this seems to be caused by the suspended buffer.

Not sure if this is related to nvim-dap-python or nvim-dap itself.

mfussenegger commented 1 year ago

:q is only hiding the buffer, not deleting it so it will remain hidden on a new debug session. This behavior is intentional.

:buffers will show it, and you can switch to it with :bnext. You'd have to use :bd if you want the terminal window to close and re-open with the next debug session.

Dmusulas commented 1 year ago

Thank you for clarification, starting out with NeoVim and did not know this.