pocco81 / dap-buddy.nvim

🐞 Debug Adapter Protocol manager for Neovim
GNU General Public License v3.0
400 stars 48 forks source link

Codebase discussion #29

Closed kozer closed 3 years ago

kozer commented 3 years ago

During the implementation of vscode-chrome-debug I noticed something that got me confused. In debuggers_list.lua there is the following structure:

M.debuggers = {
    ["python"] = { "python" },
    ["go"] = { "go" },
    ["lua"] = { "lua" },
    ["markdown"] = { "markdown" },
    ["jsnode"] = { "javascript" },
    ["php"] = { "php" },
    ["dnetcs"] = { "cs" },
    ["go_delve"] = { "go" },
    ["ccppr_lldb"] = { "c", "cpp", "cpp_matchup", "rust" },
    ["ccppr_vsc"] = { "c", "cpp", "cpp_matchup", "rust" },
    ["dart"] = { "dart" },
    ["ruby_vsc"] = { "ruby" },
}

At first, I thought that the values of this table are being used in order to add the configuration of each debugger for each of the above languages. But I noticed that this is not the case, and actually what is being done is that in the load function we use dap_info property that exists in each adapter. So, what is the purpose of the above values? Am I missing something here? Thanks.

pocco81 commented 3 years ago

The file debuggers_list.lua (AKA the codebase), tracks the existing debuggers. This list is used for: