vscode-lrdb
vscode-lrdb copied to clipboard
LRDB not attaching to local process with VS Code >= 1.82, fix/workaround described
My organisation uses LRDB to attach VS Code to an application running Lua. This process seems to have broken as of VS Code version 1.82, with the LRDB plugin version 1.0.1. When invoking the attach process, it now seems to fail and return immediately.
The issue seems to be related to the "host" setting in the attach configuration. The default value for this is "localhost" - as shown in the following image - and this is what our configuration was set to. This default value seems to no longer work.
Changing this "host" value from "localhost" to "127.0.0.1" seems to fix the issue, and the debugger now attaches as normal.
Working configuration:
While I don't know if this an issue with LRDB per-se, I am posting this issue here as I don't know what part of the IDE/plugin organism it is that was previously accepting "localhost" as a value and no longer is, and what part of the organism is still recommending "localhost" as a sensible default. Possibly the plugin needs to be updated in some way, possibly the problem is entirely with VSCode. However, if other users of LRDB have the same issue they are more likely find this workaround if it's written here.
Many thanks for the very useful plugin!
@gossidog Thanks for the report. Based on the problem and the workaround, I would guess that it is probably due to a version update of Node.js inside VSCode that changed the localhost resolution address. similar issues: https://github.com/node-fetch/node-fetch/issues/1624, https://github.com/mswjs/msw/issues/1388
The easy fix is to set it to 127.0.0.1 as you did.
Unfortunately I am not using Lua right now and don't have much time to fix it. I will fix the following values when my time is available. https://github.com/search?q=repo%3Asatoren%2Fvscode-lrdb%20localhost&type=code