Restoring Sessions
Vim offers a powerful way of restoring the state of the editor: sessions (see :h Session). Sessions are native, but they can be greatly enhanced by plugins: some "session managers" bring a seamless experience to what would otherwise be a rather manual setup.
Whenever this page refers to a "session", it is referring to a vim session, except when explicitly stated.
nvim-dap-view hooks into this session system to restore its internal state. Currently, the following data is restored:
- The selected "view" (section)
- The full state of watched expressions, including expansions of variables
In addition to that, you can also restore breakpoints, by leveraging persistent-breakpoints.nvim . Alternatively, some "session managers" support this feature out of the box (such as possession.nvim ).
Other data, such as the active DAP sessions and their stack traces are considered "ephemeral" and are not restored.
Setup
If you're using a "session manager" plugin, check if it uses vim sessions as its backbone (i.e., it does not rely on its own implementation). Custom session implementations may not work, or may require additional configuration.
To let nvim-dap-view restore its state, ensure the following criteria are met:
'sessionoptions'includes"global"nvim-dap-viewis NOT being lazy loaded
The plugin lazy loads itself. By manually lazy loading, you may prevent the "session restoration" hook from triggering.