中文 | English
API: wingman.debugger
[The debugger is not yet implemented; the current version is a stub.
startalways returns false. A complete debugging API (breakpoint management/stepping/evaluation/stack inspection) is planned.]
Module Overview
The debugger module currently has only a placeholder (stub) implementation. The source comments explicitly mark it as "debugger not yet implemented".
It currently provides only the following 4 stub functions, with no actual debugging capability:
start()— stub, always returnsfalsestop()— no-op placeholderbreakpoint(file, line)— returns a string identifier of the form"file:line"; actual breakpoints are set by the IDEbreakHere()— returns the fixed string"DEBUG_BREAK_HERE"
WARNING
Do not rely on this module for actual debugging work. Future versions will provide full breakpoint management, stepping, expression evaluation, call stack inspection, and other capabilities.
Function List
| Python function | Lua function | Signature | Description |
|---|---|---|---|
start() | start() | () -> bool | stub, always returns false |
stop() | stop() | () -> nil | stub, no-op |
breakpoint(file, line) | breakpoint(file, line) | file:str, line:int -> str | returns a "file:line" identifier string |
breakHere() | breakHere() | () -> str | returns the fixed string "DEBUG_BREAK_HERE" |
start()
Description: Starts the debugger (stub, not implemented, always returns false).
Function signature:
start() -> boolstart() -> booleanReturns:
- Always
false(Python) /false(Lua)
from wingman import debugger
ok = debugger.start()
print(ok) # False(未实现)stop()
Description: Stops the debugger (stub, no-op).
Function signature:
stop() -> Nonestop() -> nilfrom wingman import debugger
debugger.stop() # 无操作breakpoint(file, line)
Description: Registers a breakpoint location and returns a string identifier of the form "<file>:<line>". Actual breakpoints are set by the connected IDE.
Function signature:
breakpoint(file: str, line: int) -> strbreakpoint(file: string, line: number) -> stringParameters:
file- script file pathline- line number
Returns:
- The string
"<file>:<line>"
from wingman import debugger
bp = debugger.breakpoint("main.py", 42)
print(bp) # "main.py:42"breakHere()
Description: Marks a breakpoint at the current location (stub, only returns the fixed string "DEBUG_BREAK_HERE").
Function signature:
breakHere() -> strbreakHere() -> stringReturns:
- The fixed string
"DEBUG_BREAK_HERE"
from wingman import debugger
tag = debugger.breakHere()
print(tag) # "DEBUG_BREAK_HERE"