@@ -186,12 +186,12 @@ impl Client {
186186 &self,
187187 arguments: R::Arguments,
188188 ) -> Result<R::Result> {
189− let (callback_rx, mut callback_tx) = channel(1);
189+ let (callback_tx, mut callback_rx) = channel(1);
190190
191191 let arguments = Some(serde_json::to_value(arguments)?);
192192
193193 let req = Request {
194− back_ch: Some(callback_rx),
194+ back_ch: Some(callback_tx),
195195 seq: self.next_request_id(),
196196 command: R::COMMAND.to_string(),
197197 arguments,
@@ -201,7 +201,7 @@ impl Client {
201201 .send(req)
202202 .expect("Failed to send request to debugger");
203203
204− let response = callback_tx.recv().await.unwrap()?;
204+ let response = callback_rx.recv().await.unwrap()?;
205205 let response = serde_json::from_value(response.body.unwrap_or_default())?;
206206 Ok(response)
207207 }
@@ -209,7 +209,7 @@ impl Client {
209209 pub fn capabilities(&self) -> &DebuggerCapabilities {
210210 self.capabilities
211211 .as_ref()
212− .expect("language server not yet initialized!")
212+ .expect("debugger not yet initialized!")
213213 }
214214
215215 pub async fn initialize(&mut self, adapter_id: String) -> Result<()> {
@@ -240,21 +240,19 @@ impl Client {
240240 }
241241
242242 pub async fn launch(&mut self, args: serde_json::Value) -> Result<()> {
243− let mut initialized = self.listen_for_event("initialized".to_owned()).await;
243+ // TODO: buffer these until initialized arrives
244244
245− let res = self.request::<requests::Launch>(args);
246− let ev = initialized.recv();
247− join!(res, ev).0?;
245+ let response = self.request::<requests::Launch>(args).await?;
246+ log::error!("launch response {}", response);
248247
249248 Ok(())
250249 }
251250
252251 pub async fn attach(&mut self, args: serde_json::Value) -> Result<()> {
253− let mut initialized = self.listen_for_event("initialized".to_owned()).await;
252+ // TODO: buffer these until initialized arrives
254253
255− let res = self.request::<requests::Attach>(args);
256− let ev = initialized.recv();
257− join!(res, ev).0?;
254+ let response = self.request::<requests::Attach>(args).await?;
255+ log::error!("attach response {}", response);
258256
259257 Ok(())
260258 }