This is an extension to allow debugging of MoonSharp scripts running inside other applications.
It requires the application to be embedding MoonSharp 22.214.171.124 (or later) and exposing the VSCode debugger extensions.
Connect to one script object embedded in an application
Supports breakpoints, watches, local variables, self inspection
Call stack, with visualization of current coroutine
Watches can contain free formed expressions, as long they are side-effects free
Inspection of values including internal ids and table contents
Debugging of multiple script objects from the same vscode instance (MoonSharp 2.0 or later)
Features not supported
Editing of values not supported
No checks are made for file contents changes
Due to how vscode works, token-based breakpoints are not supported
How to use
Make sure the application you want to debug supports VSCode debugging.
Create a launch.json with these contents:
"debugServer" : 41912,
"name": "MoonSharp Attach",
"HELP": "Please set 'debugServer':41912 (or whatever port you ar connecting to) right after the 'version' field in this json."