Skip to content

DAP Mappings tab: what is the Language Id column for? Maybe remove it? #1837

Done

Description

@muescha

The Mappings tab of a DAP run configuration has a Language Id column. As a user, I can't tell whether I have to fill it in.

A template fills the column in, which suggests that a value is needed. Without a template, I have to decide myself whether to enter a language ID, and which one.

What I found

I looked through the code and tried it out:

  • Debugging works with the column empty. Older screenshots in the docs show it empty too.
  • A file counts as debuggable through its file type, file name pattern or language. isDebuggableFile doesn't read the language ID.
  • I found no code that sends the value to the debug adapter. It's only stored and shown.
  • DAP mappings and language server mappings aren't connected. A DAP mapping doesn't end up in a language server's mappings, with or without a language ID, and the other way around. DAP and LSP templates are separate files that only share the same format (ServerTemplate).

For language servers the value makes sense: it becomes TextDocumentItem#languageId in didOpen.

Questions

  1. Is the column meant to do something for DAP, now or later? Or is it only there because the mapping tables are shared with language servers?
  2. If it has no effect for DAP, should the DAP Mappings tab hide it? The DAP templates could then drop their languageId values too.
  3. Until that's decided, is it OK to say in the DAP user guide that DAP doesn't use it, so nobody spends time filling it in?

Activity

  1. angelozerr commented on Nov 3, 2026

    @angelozerr
    Contributor

    @muescha you are right, there is no sense to show languageId for DAP. I think it is done like this because I wanted to share code with LSP.

    If you have time, please fix that.

  2. muescha commented on Nov 4, 2026

    @muescha
    ContributorAuthor

    Thanks, I'll take care of it.

    While looking into the Mappings tab, I found another bug that is easy to miss, because it doesn't affect debugging: reopening and saving a DAP run configuration can duplicate its mappings. I haven't opened an issue for it yet. I plan to fix that and to unify the LSP and DAP mappings panels, which are nearly identical copies today. I'm still checking whether unifying them would change any existing behavior.

    I'll work out how removing the Language Id column for DAP fits into that, so the shared panel can show it for language servers only.

  3. added
    question
    dap
    on Nov 21, 2026
  4. lagergren commented on Nov 23, 2026

    @lagergren
    Collaborator

    @muescha Are you still working on this, along with unifying the LSP and DAP Mappings panels and the duplicate-mappings bug you mentioned? If you'd rather keep that larger change separate, I could take just the removal of the Language Id column from the DAP Mappings tab, and the languageId values of the DAP templates, as Angelo suggested. If you're on it, I'll leave it to you.

  5. muescha commented on Nov 23, 2026

    @muescha
    ContributorAuthor

    yes - you can do the removal of language id seperate - thx :)

  6. added
    enhancement
    on Nov 24, 2026
  7. added this to the 0.30.2 milestone on Nov 24, 2026
  8. lagergren commented on Nov 24, 2026

    @lagergren
    Collaborator

    Thanks! It's in #2173: the DAP Mappings tab has no Language Id column now, and the DAP templates have no languageId values. The shared mappings panel and the duplicated mappings after saving a run configuration stay yours. That bug has no issue yet: will you open one, or shall I?

  9. added a commit that references this issue on Nov 24, 2026
    084bf75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    UIdapenhancementquestion

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions