Skip to content

Commit

Permalink
Start wiring through custom launch data
Browse files Browse the repository at this point in the history
  • Loading branch information
RemcoSmitsDev committed Jun 29, 2024
1 parent 854ff68 commit 47a5f0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 4 additions & 6 deletions crates/dap/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use futures::{
AsyncBufRead, AsyncReadExt, AsyncWrite, SinkExt as _, StreamExt,
};
use gpui::{AppContext, AsyncAppContext};
use serde_json::json;
use serde_json::Value;
use smol::{
io::BufReader,
net::TcpStream,
Expand Down Expand Up @@ -244,11 +244,9 @@ impl DebugAdapterClient {
Ok(capabilities)
}

pub async fn launch(&self) -> Result<()> {
self.request::<Launch>(LaunchRequestArguments {
raw: json!({"noDebug": false}),
})
.await
pub async fn launch(&self, custom: Value) -> Result<()> {
self.request::<Launch>(LaunchRequestArguments { raw: custom })
.await
}

pub async fn resume(&self, thread_id: u64) {
Expand Down
3 changes: 2 additions & 1 deletion crates/project/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ use rpc::{ErrorCode, ErrorExt as _};
use search::SearchQuery;
use search_history::SearchHistory;
use serde::Serialize;
use serde_json::json;
use settings::{watch_config_file, Settings, SettingsLocation, SettingsStore};
use sha2::{Digest, Sha256};
use similar::{ChangeTag, TextDiff};
Expand Down Expand Up @@ -1117,7 +1118,7 @@ impl Project {
client.configuration_done().await.log_err()?;

// launch/attach request
client.launch().await.log_err()?;
client.launch(json!({"noDebug": false})).await.log_err()?;

let client = Arc::new(client);

Expand Down

0 comments on commit 47a5f0c

Please sign in to comment.