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

Unable to debug with Bun VSCode Extension #8250

Closed
monawwar-appointy opened this issue Jan 18, 2024 · 10 comments · Fixed by #8267
Closed

Unable to debug with Bun VSCode Extension #8250

monawwar-appointy opened this issue Jan 18, 2024 · 10 comments · Fixed by #8267
Labels
bug Something isn't working vscode Something to do with the VSCode extension

Comments

@monawwar-appointy
Copy link

What version of Bun is running?

1.0.23

What platform is your computer?

mac m1

What steps can reproduce the bug?

Install Bun VSCode extension and try to debug a file

What is the expected behavior?

It should start the debug mode

What do you see instead?

I see an error in the debug console

Failed to start inspector:
 131 |     }, this.#listen();
132 |   }
133 |   get url() {
134 |     return this.#url;
135 |   }
136 |   #listen() {
                        ^
EADDRINUSE: Failed to start server. Is port 6499 in use?
 syscall: "listen"

      at #listen (internal:debugger:136:19)
      at new Debugger (internal:debugger:122:27)
      at internal:debugger:98:25

Additional information

I checked no port is in use. I just installed the extension and tried for the first time.

@monawwar-appointy monawwar-appointy added the bug Something isn't working label Jan 18, 2024
@Electroid Electroid added the vscode Something to do with the VSCode extension label Jan 18, 2024
@2Lavine
Copy link

2Lavine commented Jan 18, 2024

same problem but in mac intel
debugging with web is ok.

@monawwar-appointy
Copy link
Author

does the breakpoint work with web debugging?

@monawwar-appointy
Copy link
Author

monawwar-appointy commented Jan 18, 2024

also, i am having issue with ngrok, it doesn't work, always giving me error:

1212 |         this[kStopReading] = true;
1213 |         if (!(error instanceof RequestError)) {
1214 |             error = new RequestError(error.message, error, this);
1215 |         }
1216 |         const typedError = error;
1217 |         const { response } = typedError;
                    ^
RequestError: Attempted to assign to readonly property.
 code: "ERR_GOT_REQUEST_ERROR"

#8258

@2Lavine
Copy link

2Lavine commented Jan 18, 2024

cool. I rolled the version back to 1.0.22 and it worked normally.

@monawwar-appointy
Copy link
Author

cool. I rolled the version back to 1.0.22 and it worked normally.

which way you used to install 1.0.22

@2Lavine
Copy link

2Lavine commented Jan 18, 2024

pnpm install bun@1.0.22 --global

@Electroid
Copy link
Contributor

You can also run bun upgrade --canary to get a fixed version

@nick4814
Copy link

nick4814 commented Jul 23, 2024

@Electroid I tried bun upgrade --canary, but this did not fix the problem for me. My issue is similar, but I'm using Windows 10.

Assumption

The URL format ws+unix:// suggests it's trying to use a Unix socket, which is not directly compatible with Windows file paths.

Note: I assume using WSL would fix this, but that is a boundary for companies that primarily use Windows for development.

Error

Failed to start inspector:
 40 |       }
41 |     },
42 |     close: () => {
43 |       writer.close(), pendingMessages.length = 0;
44 |     }
45 | }, parseUrl = function(input) {
                           ^
TypeError: "ws+unix://C:\Users\[USER_NAME]\AppData\Local\Temp\fee8lxqt44n.sock?break=1" cannot be parsed as a URL.
      at internal:debugger:45:23
      at new Debugger (internal:debugger:124:14)
      at internal:debugger:100:13

@a4z
Copy link

a4z commented Aug 29, 2024

Assumption

The URL format ws+unix:// suggests it's trying to use a Unix socket, which is not directly compatible with Windows file paths.

Note: I assume using WSL would fix this, but that is a boundary for companies that primarily use Windows for development.

same problem here, on Windows
is there another issue for this, since that one is closed?

Edit: seems #8851 is the one to monitor

@smultar
Copy link

smultar commented Sep 3, 2024

I have also encountered this issue and am hoping for a resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vscode Something to do with the VSCode extension
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants