Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LRDB not attaching to local process with VS Code >= 1.82, fix/workaround described #249

Open
gossidog opened this issue Oct 17, 2023 · 1 comment

Comments

@gossidog
Copy link

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

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:
image

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!

@satoren
Copy link
Owner

satoren commented Oct 18, 2023

@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: node-fetch/node-fetch#1624, mswjs/msw#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants