actboy168 / lua-debug

Lua Debug Adapter for Visual Studio Code
MIT License
429 stars 92 forks source link

Detach the debugger #279

Closed Sedas25 closed 8 months ago

Sedas25 commented 8 months ago

Is it possible to detach the debugger from a running lua state without killing the Process ?

Reason: we have an application with a realy expensive build up, so it's need 4+ seconds before I can execute a lua code. I have the plan to start the Application and execute the debugger in vscode with the second applications that send over a Named pipe the lua file. So the main application is not required too build up every debug session.

actboy168 commented 8 months ago

Use attach mode.

Sedas25 commented 8 months ago

but in the attach mode i cant press F5 again to launch another script

i want: F5 -> start the script & debug -> run ...... -> script end debugger disattach -> vscode end debug mode.

but the Main Application is still running.

Now in the attach mode the debug in vscode is still active.

see: https://microsoft.github.io/debug-adapter-protocol/specification#Events_Exited

actboy168 commented 8 months ago

Do you want the running process to execute a Lua script? This is not the debugger's job.

Sedas25 commented 8 months ago

No, I want the debugger to detach/send to VS code that the debug job is done after the lua script is over. But the main application remains on. Currently VSCode finishes the debug job only when the main application is finished.

Sorry for my Master Artwork ^^ but maybe it´s help to understand

image
actboy168 commented 8 months ago

So this is the attach mode.