2026-05-16 00:59:51 +08:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
from json import loads
|
|
|
|
|
_DEBUG_INFO = "{#debug_options}"
|
|
|
|
|
_TARGET_MOD_DIRS = "{#target_mod_dirs}"
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
DEBUG_CONFIG = loads(_DEBUG_INFO) if not isinstance(_DEBUG_INFO, dict) else _DEBUG_INFO
|
|
|
|
|
except:
|
|
|
|
|
DEBUG_CONFIG = {}
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
TARGET_MOD_DIRS = loads(_TARGET_MOD_DIRS) if not isinstance(_TARGET_MOD_DIRS, list) else _TARGET_MOD_DIRS
|
|
|
|
|
except:
|
|
|
|
|
TARGET_MOD_DIRS = []
|
|
|
|
|
|
|
|
|
|
def GET_DEBUG_IPC_PORT():
|
|
|
|
|
import os
|
|
|
|
|
port = os.getenv("MCDEV_DEBUG_IPC_PORT")
|
|
|
|
|
if port is None:
|
|
|
|
|
return None
|
2026-07-21 21:04:45 +08:00
|
|
|
return int(port)
|
|
|
|
|
|
|
|
|
|
def GET_MCP_BRIDGE_STATE_PATH():
|
|
|
|
|
import os
|
|
|
|
|
path = os.getenv("MCDEV_MCP_BRIDGE_STATE")
|
|
|
|
|
if not path:
|
|
|
|
|
return None
|
|
|
|
|
return path
|