Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to specify arguments in the adapterExecutableCommand based on the debug configuration #57706

Closed
rherrmann opened this issue Aug 31, 2018 · 1 comment
Assignees
Labels
api debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality on-testplan

Comments

@rherrmann
Copy link

For a custom debug adapter, written in Java, that uses LSP4J for client/server communication, I would like to be able to specify (debug server) program arguments derived from the debug configuration.

The extension uses a adapterExecutableCommand to determine the executable path, which is registered and implemented like this:

function registerGetDebugAdapterCommand(context: ExtensionContext) {
  context.subscriptions.push(commands.registerCommand('<command-id>', () => {
    return {
      command: '/absolve/path/to/executable',
      args: ['debug-server', '--trace']
    };
  }));
}

The --trace option shows details about the messages being sent forth and back and help during development or to track down problems in production. This option, however, I would like to set only if a corresponding setting in the debug configuration has been specified.

If the DebugConfiguration could be accessed from within the adapterExecutableCommand implementation, the arguments could be specified accordingly.

LSP4J makes it difficult to pass this information at a later point in time - the message tracing option needs to be set up when starting the listener that takes control over the communication process.

By passing this option through a custom request, the first few request/response cycles would go untraced.

VS Code version is 1.26

@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality api labels Aug 31, 2018
@weinand weinand added this to the On Deck milestone Aug 31, 2018
@weinand weinand modified the milestones: On Deck, September 2018 Sep 12, 2018
@weinand
Copy link
Contributor

weinand commented Sep 12, 2018

duplicate of #45220

@weinand weinand closed this as completed Sep 12, 2018
@weinand weinand added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 12, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality on-testplan
Projects
None yet
Development

No branches or pull requests

2 participants