Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/ExtensionHost/
DebugService.rs

1#![allow(non_snake_case, unused_variables, dead_code, unused_imports)]
2
3//! Wire methods: `extensionhostdebugservice:*`.
4//! Bridges VS Code's `IExtensionHostDebugService` channel. `reload` triggers
5//! a real Cocoon restart by emitting `sky://exthost/debug-reload` so Wind can
6//! tear down caches before the fresh spawn. Other methods are acknowledged.
7
8use serde_json::{Value, json};
9use tauri::{AppHandle, Emitter};
10use CommonLibrary::IPC::SkyEvent::SkyEvent;
11
12pub async fn ExtensionHostDebugReload(ApplicationHandle:AppHandle) -> Result<Value, String> {
13	crate::dev_log!("exthost", "extensionhostdebugservice:reload");
14	if let Err(Error) = ApplicationHandle.emit(SkyEvent::ExtHostDebugReload.AsStr(), json!({})) {
15		crate::dev_log!("exthost", "warn: extensionhostdebugservice:reload emit failed: {}", Error);
16	}
17	Ok(Value::Null)
18}
19
20pub async fn ExtensionHostDebugClose(ApplicationHandle:AppHandle) -> Result<Value, String> {
21	crate::dev_log!("exthost", "extensionhostdebugservice:close");
22	if let Err(Error) = ApplicationHandle.emit("sky://exthost/debug-close", json!({})) {
23		crate::dev_log!("exthost", "warn: extensionhostdebugservice:close emit failed: {}", Error);
24	}
25	Ok(Value::Null)
26}