lua-debug icon indicating copy to clipboard operation
lua-debug copied to clipboard

Remote debug LUA in program C++

Open Anderson0xFF opened this issue 2 years ago • 4 comments

I use LUA in my C++ program as a scripting language. How can I debug my scripts that have custom functions from my C++ program? It can be sample code, C++ and LUA. The idea is to use my program as a server for debugging.

Anderson0xFF avatar Sep 20 '22 20:09 Anderson0xFF

https://github.com/actboy168/lua-debug/tree/master/examples/standalone

actboy168 avatar Sep 23 '22 07:09 actboy168

I don't understand this. I don't see anything in debugger.lua that looks like it interfaces with VSCode. All it does it replace the dofile command? What is the "publish" folder?

UltraEngine avatar Apr 08 '23 06:04 UltraEngine

until today I didn't understand.

Anderson0xFF avatar Apr 08 '23 14:04 Anderson0xFF

until today I didn't understand.

Add this line to your lua program main file: require "debugger":start "0.0.0.0:12306":event "wait"

Copy .vscode folder from ./lua-debug/examples/attach to your program's lua folder Copy debugger.lua from ./lua-debug/examples/attach to your program's lua folder Run your program

Open your program's lua folder in VS Code and press F5

If you installed plugin correctly then you must have actboy168 extensions in your C:\Users\USER_NAME\.vscode\extensions folder.

TriRozhka avatar Jun 28 '24 19:06 TriRozhka