init method
初始化
Implementation
Future<void> init(
{String toolTitle = 'KDebugTools',
bool autoStartWebServer = false,
bool autoStartHttpHook = false,
List<String>? allServEnvKeys,
List<ServerEnvConfig>? allServConfigs}) async {
_title = toolTitle;
await ServerEnv.instance.init(allServEnvKeys, allServConfigs);
await NetworkDebugger.instance.init();
if (autoStartWebServer) {
await WebServer.instance.start();
}
if (autoStartHttpHook) {
HttpHookController.instance.setEnable(true);
}
DebuggerRegister.instance.registerDefault();
return Future.value();
}