opened
rherrmann
username_0
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:
```typescript
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
Allow to specify arguments in the adapterExecutableCommand based on the debug configuration
issue
closed
weinand
username_1
issue
created
weinand
username_1
duplicate of #45220
comment