Add debug-adapter field to languages.toml

This commit is contained in:
Dmitry Sharshakov 2021-08-23 16:48:06 +03:00
parent dabec2d799
commit c5b210df59
No known key found for this signature in database
GPG key ID: 471FD32E15FD8473
7 changed files with 45 additions and 10 deletions

View file

@ -113,16 +113,14 @@ impl Client {
}
pub async fn tcp_process(
cmd: &str,
args: Vec<&str>,
port_format: &str,
config: DebugAdapterConfig,
id: usize,
) -> Result<(Self, UnboundedReceiver<Payload>)> {
let port = Self::get_port().await.unwrap();
let process = Command::new(cmd)
.args(args)
.args(port_format.replace("{}", &port.to_string()).split(' '))
let process = Command::new(config.command)
.args(config.args)
.args(config.port_arg.replace("{}", &port.to_string()).split(' '))
// silence messages
.stdin(Stdio::null())
.stdout(Stdio::null())