tomblind / local-lua-debugger-vscode

Local Lua Debugger for VSCode
MIT License
101 stars 26 forks source link

Attache process debugging support #27

Open 36yang opened 3 years ago

36yang commented 3 years ago

I hope it provide Attache process debugging support,

tomblind commented 3 years ago

This will require remote debugging support to work (#2).

astrochili commented 3 years ago

I think to try your debugger with Defold, but I don't have any ways to run Defold debug build with command line, only manually with UI.

Waiting for remote debugging.

Look at mobdebug for inspiration. Unfortunately, there is no any text editor with a mobdebug extension, but it's simple and stable with ZeroBraine Studio and Defold built-in editor.

hendrikp commented 2 years ago

I think this would work with the named pipe support now?

tomblind commented 2 years ago

This may be possible now but I'll have to investigate. Attaching presumes that the Lua program is running when the debugging extension starts, which means Lua needs to create the pipe. I'm not sure that's possible without extra libraries (especially on windows).

hendrikp commented 2 years ago

the lua program could probably just don't debug stuff until the pipe exist (the existence of the pipe itself could be the signal to start debugging)

tomblind commented 2 years ago

Polling for the pipe to exist would likely be prohibitively slow. Supplying a polling method to the environment to call at regular intervals might be possible (similar to what's suggested in #32), but this would require the user to call the hook in an appropriate place.