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

Comments

Projects
None yet
2 participants
@rherrmann

rherrmann commented Aug 31, 2018

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 this to the On Deck milestone Aug 31, 2018

@weinand weinand modified the milestones: On Deck, September 2018 Sep 12, 2018

@weinand

This comment has been minimized.

Show comment
Hide comment
@weinand

weinand Sep 12, 2018

Member

duplicate of #45220

Member

weinand commented Sep 12, 2018

duplicate of #45220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment