Mountain/RPC/CocoonService/Debug/
StopDebugging.rs1use serde_json::json;
6use tauri::Emitter;
7use tonic::{Response, Status};
8use ::Vine::Generated::{Empty, StopDebuggingRequest};
9
10use crate::{RPC::CocoonService::CocoonServiceImpl, dev_log};
11
12pub async fn Fn(Service:&CocoonServiceImpl, Request:StopDebuggingRequest) -> Result<Response<Empty>, Status> {
13 dev_log!("cocoon", "[CocoonService] stop_debugging: session={}", Request.session_id);
14
15 let _ = Service
16 .environment
17 .ApplicationHandle
18 .emit("sky://debug/sessionEnd", json!({ "sessionId": Request.session_id }));
19
20 Ok(Response::new(Empty {}))
21}