debugger support for dx (#3814)
* add vscode debugger for apps * todo: need to disconnect when rebuilding * update debugger * add uri handler to remote launch the debugger * attach * dont panic * fixed it - hung processes are not errors * wip: android debugger * clean it up a bit * revert ios stdout/stderr * wire up pid from ios * use target family instead of target_arch * fix android * bring back softkill * typo
This commit is contained in:
1 parent
eb15b42ab1
commit
b2bd1f48d4
13 files changed
+305
-41
No files matched your search
@@ -69,6 +69,7 @@ pub(crate) struct ConnectedWsClient {
|
||||
socket: WebSocket,
|
||||
build_id: Option<BuildId>,
|
||||
aslr_reference: Option<u64>,
|
||||
pid: Option<u32>,
|
||||
}
|
||||
|
||||
impl WebServer {
|
||||
@@ -146,12 +147,13 @@ impl WebServer {
|
||||
new_hot_reload_socket = &mut new_hot_reload_socket => {
|
||||
if let Some(new_socket) = new_hot_reload_socket {
|
||||
let aslr_reference = new_socket.aslr_reference;
|
||||
let pid = new_socket.pid;
|
||||
let id = new_socket.build_id.unwrap_or(BuildId::CLIENT);
|
||||
|
||||
drop(new_message);
|
||||
self.hot_reload_sockets.push(new_socket);
|
||||
|
||||
return ServeUpdate::NewConnection { aslr_reference, id };
|
||||
return ServeUpdate::NewConnection { aslr_reference, id, pid };
|
||||
} else {
|
||||
panic!("Could not receive a socket - the devtools could not boot - the port is likely already in use");
|
||||
}
|
||||
@@ -261,6 +263,7 @@ impl WebServer {
|
||||
BuilderUpdate::StdoutReceived { .. } => {}
|
||||
BuilderUpdate::StderrReceived { .. } => {}
|
||||
BuilderUpdate::ProcessExited { .. } => {}
|
||||
BuilderUpdate::ProcessWaitFailed { .. } => {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,6 +498,7 @@ fn build_devserver_router(
|
||||
struct ConnectionQuery {
|
||||
aslr_reference: Option<u64>,
|
||||
build_id: Option<BuildId>,
|
||||
pid: Option<u32>,
|
||||
}
|
||||
|
||||
// Setup websocket endpoint - and pass in the extension layer immediately after
|
||||
@@ -506,7 +510,7 @@ fn build_devserver_router(
|
||||
get(
|
||||
|ws: WebSocketUpgrade, ext: Extension<UnboundedSender<ConnectedWsClient>>, query: Query<ConnectionQuery>| async move {
|
||||
tracing::debug!("New devtool websocket connection: {:?}", query);
|
||||
ws.on_upgrade(move |socket| async move { _ = ext.0.unbounded_send(ConnectedWsClient { socket, aslr_reference: query.aslr_reference, build_id: query.build_id }) })
|
||||
ws.on_upgrade(move |socket| async move { _ = ext.0.unbounded_send(ConnectedWsClient { socket, aslr_reference: query.aslr_reference, build_id: query.build_id, pid: query.pid }) })
|
||||
},
|
||||
),
|
||||
)
|
||||
@@ -515,7 +519,7 @@ fn build_devserver_router(
|
||||
"/build_status",
|
||||
get(
|
||||
|ws: WebSocketUpgrade, ext: Extension<UnboundedSender<ConnectedWsClient>>| async move {
|
||||
ws.on_upgrade(move |socket| async move { _ = ext.0.unbounded_send(ConnectedWsClient { socket, aslr_reference: None, build_id: None }) })
|
||||
ws.on_upgrade(move |socket| async move { _ = ext.0.unbounded_send(ConnectedWsClient { socket, aslr_reference: None, build_id: None, pid: None }) })
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user