Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Customizing debugger UI

James Dugan edited this page Jun 14, 2021 · 1 revision

When kak-dap is started, three clients need to be laid out: the jump client (basically the code window), the stacktrace client, and the variables client. This is done by calling the dap-setup-ui command, which can be overridden. The default implementation of dap-setup-ui is quite primitive and simply calls new for each client, which can give bizarre results with certain windowing systems such as tmux. Here are some examples to achieve a decent layout with different windowing systems:

TMUX

Add the following to your kakrc:

define-command -override dap-setup-ui %{
    #Setup the jump client
    rename-client main
    set global jumpclient main

    #Setup the stacktrace client
    tmux-terminal-horizontal kak -c %val{session} -e "rename-client stacktrace"
    set global stacktraceclient stacktrace

    #Setup the variables client
    tmux-terminal-vertical kak -c %val{session} -e "rename-client variable"
    set global variablesclient variable
}
define-command -override dap-run-in-terminal -params 1.. %{
    evaluate-commands -try-client %opt{stacktraceclient} %{
        tmux-terminal-vertical %arg{@}
        dap-cmd pid
    }
}
Clone this wiki locally