tomblind / local-lua-debugger-vscode

Local Lua Debugger for VSCode
MIT License
107 stars 26 forks source link

Crash when entering in mapSources function #36

Closed redsigma closed 3 years ago

redsigma commented 3 years ago

If i call a non existing function. The debugger will enter into this call, resulting in a crash

image

If i wrap the code with the .call(function() end) then it no longer crashes and shows a nice error image

I'd like to show this error in the console. I found out this can be done with dbusted and a custom output handler but the crash from the debugger still happens.

Adding a nill check at the first screenshot fixes the problem but i am not sure if it's the correct fix because if i use the function shown in the second screenshot then more stuff gets printed to console. In the first screenshot nothing is printed because of the nill check.

Another question is if there is any way to call the .call(function() end) only once and affecting all the tests instead of wrapping it around code ?

tomblind commented 3 years ago

Would you be able to share more of the code that causes this issue? I am not able to reproduce it just by calling a non-existent method.

redsigma commented 3 years ago

I am using the latest update and so far i can no longer reproduce this bug. I will post a unit test when i will be able to reproduce it.

I think you can close this for now.