moonsharp icon indicating copy to clipboard operation
moonsharp copied to clipboard

VS Code debugger not working properly since 1.13 update

Open Frogvall opened this issue 7 years ago • 9 comments

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.

Frogvall avatar Jul 07 '17 06:07 Frogvall

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)

BHandle avatar Aug 24 '17 14:08 BHandle

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?

Frogvall avatar Aug 25 '17 12:08 Frogvall

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!

TimRamsay avatar Sep 28 '17 17:09 TimRamsay

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...

SungwooNam avatar Dec 01 '17 06:12 SungwooNam

Same problem here, and followed link provided by @SungwooNam , the debugger does not work either.

LazyKnightX avatar Apr 29 '18 13:04 LazyKnightX

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.

AdamFrisby avatar May 10 '18 20:05 AdamFrisby

Did someone find a solution ?

Ismoh avatar Jun 19 '18 17:06 Ismoh

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.

AdamFrisby avatar Jun 23 '18 22:06 AdamFrisby

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.

Ismoh avatar Jun 24 '18 00:06 Ismoh