Intro: Hi folks, I'd like to ask some questions about extension developing. I'd like to create a remote lua debuger extension (for linux user, haven't found any working lua debugger). When I touch the launch button, the debug server should be started to listen (on e.g. 0.0.0.0:8723) for waiting debugger connection. And on the other side sould communicate through the DAP (debug adapter protocol) with vscode.
Problem: I'm starting to implement the my own debuger extension... But I am new in this topic and with Node.js also. My question is: How can I log (or debug) my LoggingDebugSession (where the DAP is implemented)?
I looked at the MockDebug extension example project.And tried to rewrite...
Try to log into console, my file luaDebugSession.ts
:
export class LuaDebugSession extends LoggingDebugSession {
public constructor() {
super("remote-lua-debug-log.txt");
this.sendEvent(new OutputEvent("Try to log"));
console.log("Try log into console")
}
protected initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void {
this.sendEvent(new OutputEvent("Try to log 2"));
console.log("Try log into console 2")
// do something
this.sendEvent(new InitializedEvent());
}
// next code...
}
In console should be the logged output.