Files
neovim/runtime/doc
bfredl 9c42db1181 feat(ui_client): "press ENTER" free nvim crash debugging
This feature might be a little silly and niche, but it is very useful
for _my_ workflow (and open source is about mee)

An issue which is never present on high quality RELEASE builds, but
might occur on Debug builds is that the Nvim server crashes
on some error in your unfinished PR code. If you compile your debug
builds with sanitizers enabled, as you should, the ASAN/UBSAN runtime
will print some useful info about your mistake to stderr or a log file,
such as a stack trace. This can be used to jump to the error in the
code.

This allows the nvim server to install a signal hander in the ui client,
which can load this log file in a good safe version of nvim and parse it
using 'errorformat'

This is inspired by the "press ENTER" free workflow of ui2 and applies
it beyond the lifetime cycle of the nvim instance.

example config:
```lua
    local asan = vim.env.ASAN_OPTIONS
    if asan ~= nil and string.match(asan, "log_path=/tmp/nvim_asan")  then
      local myname = "/tmp/nvim_asan."..vim.uv.getpid()

      local args = {"--embed", "-n", "+set efm=%+A%*[^/]%f:%l:%c", "+silent cfile "..myname, "+silent cfirst", "+silent copen"}

      vim.api.nvim__set_restart_on_crash("nvim", args)
    end
```

and run your debug nvim like so

    ASAN_OPTIONS=handle_abort=1,handle_sigill=1,log_path=/tmp/nvim_asan ./build/bin/nvim
2026-05-11 11:00:03 +02:00
..
2026-04-01 07:59:51 +08:00
2026-04-16 10:48:11 -04:00
2026-02-12 13:46:45 +01:00
2024-05-15 23:19:26 +02:00
2026-04-29 17:37:47 -04:00
2026-04-25 11:16:18 -04:00
2026-05-07 10:36:48 +02:00
2026-05-07 10:36:55 +02:00
2026-05-07 10:36:55 +02:00
2026-04-18 15:38:59 -04:00
2025-12-06 20:33:02 -05:00
2023-06-25 17:14:28 +02:00
2026-04-29 17:37:47 -04:00
2026-04-18 15:38:59 -04:00
2026-01-27 17:14:57 -05:00
2026-05-07 10:36:55 +02:00
2026-04-18 15:38:59 -04:00
2026-03-29 20:53:24 -04:00
2025-12-15 13:55:15 -05:00
2026-03-16 10:29:58 +01:00
2026-05-07 10:36:55 +02:00
2026-04-16 10:48:11 -04:00
2025-09-28 20:57:59 -07:00
2026-05-07 10:36:55 +02:00
2026-05-07 10:36:48 +02:00
2026-03-24 00:14:55 +01:00
2026-05-10 13:00:52 -04:00
2025-12-15 13:55:15 -05:00
2026-04-26 20:25:49 +02:00
2026-05-07 10:36:55 +02:00
2026-03-22 01:57:28 +01:00
2026-04-16 10:48:11 -04:00
2026-05-07 10:36:55 +02:00
2026-04-22 18:25:07 -04:00
2026-05-07 10:36:55 +02:00
2026-05-07 10:36:55 +02:00
2026-01-07 08:11:42 +08:00
2026-03-24 00:14:55 +01:00
2026-05-07 10:36:48 +02:00
2026-05-07 10:36:48 +02:00
2026-05-07 10:36:55 +02:00
2026-05-10 13:00:52 -04:00
2026-05-07 10:36:48 +02:00
2026-05-10 13:00:52 -04:00