Skip to content

bug: Overly agressive checks for extending configs for remote debugging #11

@filiptrplan

Description

@filiptrplan

Did you check docs and existing issues?

  • I have read all the plugin docs
  • I have searched the existing issues
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.10.4

Operating system/version

OpenSUSE Tumbleweed

Describe the bug

When trying to create an attach configuration, it doesn't let you.

Steps To Reproduce

  1. Create an attach configuration like so:
    dap.configurations.java = {
      {
        type = 'java',
        request = 'attach',
        name = 'Debug (Attach) - Remote',
        hostName = '127.0.0.1',
        port = 5005,
      },
    }
  1. Try to run the configuration.

Expected Behavior

It should just run the configuration but I get the following error:

To enrich the config, mainClass should already be present

This is fixed by just adding the mainClass and projectName fields but they shouldn't be necessary for a remote debug configuration.

    dap.configurations.java = {
      {
        mainClass = '',
        projectName = '',
        type = 'java',
        request = 'attach',
        name = 'Debug (Attach) - Remote',
        hostName = '127.0.0.1',
        port = 5005,
      },
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions