Open Frogvall opened 7 years ago
I haven't been able to get it to attach since 0.8. What's your trick? For me, VS Code just yells at me that there is no executable, (if I recall correctly)
I can't know for sure what your specific problem is, but I'm gonna make a guess:
This is what the automated launch config looks like (when pressing F5 and selecting Moonsharp in VS Code):
{ "version": "0.2.0", "configurations": [ { "name": "MoonSharp Attach", "type": "moonsharp-debug", "request": "attach", "HELP": "Please set 'debugServer':41912 (or whatever port you ar connecting to) right after the 'version' field in this json." } ] }
This is wrong, since some time back and the way it's supposed to look is:
{ "version": "0.2.0", "configurations": [ { "name": "MoonSharp Attach", "type": "moonsharp-debug", "debugServer": 41912, "request": "attach" } ] }
Does that help you?
I get the following "Cannot determine executable for debug adapter '{0}'." I'm using Unity 2017.1.1p3 with MoonSharp installed from the unity package and have tried various versions of Launch.json, all with the same result. Any help would be really appreciated!
I followed https://blog.jpahnen.com/2017/05/debugging-lua-scripts-in-vs-code-using.html and managed to attach the server - MoonSharp 2.0, .NET 4.0, VSCode 1.18.1. Windows10. Though after VSCode connected , it doesn't stop on a breakpoint. Still working on to figure out...
Same problem here, and followed link provided by @SungwooNam , the debugger does not work either.
Same issue here - I am able to confirm the Debug Console works (and echoing a value from the script does return correctly), but breakpoints do not work, and variables/watch/call stack do not populate.
Did someone find a solution ?
In my case, partially. The watch/call/variables windows will populate when pausing the execution -- the issue I had was in fixing an exception (afraid details escape me right now) in the handshake I disabled the initialised reply message by accident.
The breakpoint lines though I haven't seen much luck with, although setting breakpoints do appear to work.
Thanks for the reply, but I am not able to connect vs code debugger to my running instance. "Connection refused". Therefore I am using the remote debugger instead, which only work at the first script attachment. If you run the whole lua code once, after that all set breakpoints are somehow disabled.
Since VS Code 1.13 was released, the Moonsharp VS Code Debugger has stopped working properly. It does break at breakpoints, but the yellow line is no longer there, making it impossible to know where in the script we've stopped. It is rather difficult to use the debugger at all at this point, and we had to direct our users to rollback VS Code to 1.12.2, which is an undesirable solution.