INNER CODE UNIT · Python

start_debugpy_server

nils-soderman/vscode-unreal-python · site-packages/vscode_unreal/debug.py:55

def start_debugpy_server(port: int) -> bool:
    """ Starts a debugpy server on the specified port """
    import debugpy

    python_exe = unreal.get_interpreter_executable_path()
    if not python_exe:
        return False

    debugpy.configure(python=python_exe)
    debugpy.listen(port)

    os.environ[VSCODE_DEBUG_SERVER_ENV_VAR] = str(port)

    return True


def get_current_debugpy_port() -> int:
    """ Returns the current debugpy server port or -1 if it is not set """

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…