Skip to main content

Mountain/Vine/Server/Notification/
DebugLifecycle.rs

1//! Cocoon → Mountain `debug.addBreakpoints` / `debug.removeBreakpoints` /
2//! `debug.consoleAppend` notifications. Fans on `sky://debug/<suffix>`
3//! so the Sky-side debug view picks up breakpoint changes and console
4//! output from the extension's `vscode.debug.*` surface.
5
6use serde_json::Value;
7use tauri::Emitter;
8
9use crate::{Vine::Server::MountainVinegRPCService::MountainVinegRPCService, dev_log};
10
11pub async fn DebugLifecycle(Service:&MountainVinegRPCService, MethodName:&str, Parameter:&Value) {
12	let EventName = format!("sky://debug/{}", &MethodName["debug.".len()..]);
13
14	if let Err(Error) = Service.ApplicationHandle().emit(&EventName, Parameter) {
15		dev_log!("grpc", "warn: [MountainVinegRPCService] {} emit failed: {}", EventName, Error);
16	}
17}