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

VSCode extension issue using the embedded CLI of VSCode #15425

Open
ScreamZ opened this issue Nov 26, 2024 · 8 comments
Open

VSCode extension issue using the embedded CLI of VSCode #15425

ScreamZ opened this issue Nov 26, 2024 · 8 comments
Assignees
Labels
bug Something isn't working debugger Something to do with `bun --inspect` or the debugger vscode Something to do with the VSCode extension

Comments

@ScreamZ
Copy link

ScreamZ commented Nov 26, 2024

What version of Bun is running?

1.1.37+8ca0eb831

What platform is your computer?

Darwin 24.0.0 arm64 arm

What steps can reproduce the bug?

I'm not able to tell exactly when it started but using the VSCode extension for bun now trigger an error in the console, before running the expected TypeScript code.


Inside VSCode terminal

A simple

// poke.ts
console.log("hello world");

now run bun poke.ts and get:

  • Without bun extension for VSCode
hello world          
  • With Bun extension for VSCode (after re-opening the terminal)
382 | function reset() {
383 |   if (enableANSIColors)
384 |     return "\x1B[49m";
385 |   return "";
386 | }
387 |   Bun.connect({
                   ^
ENOENT: Failed to connect
   errno: 2
 syscall: "connect"

      at notify (internal:debugger:387:14)
      at internal:debugger:73:13
hello world

What is the expected behavior?

There should be no error in the console.

What do you see instead?

382 | function reset() {
383 |   if (enableANSIColors)
384 |     return "\x1B[49m";
385 |   return "";
386 | }
387 |   Bun.connect({
                   ^
ENOENT: Failed to connect
   errno: 2
 syscall: "connect"

      at notify (internal:debugger:387:14)
      at internal:debugger:73:13

Additional information

No response

@ScreamZ ScreamZ added bug Something isn't working needs triage labels Nov 26, 2024
@ScreamZ ScreamZ changed the title VSCode extension issue with BUN. VSCode extension issue using the embedded CLI of VSCode Nov 26, 2024
@Jonatthu
Copy link

Also, vscode fails in debug tests randomly.

bun test v1.1.37 (8ca0eb83)

src/middleware/publicProcedure.test.ts:
Debugger attached.

# Unhandled error between tests
-------------------------------
4 | 
5 | import { createTestSuite, createTestTrpcCaller } from '~@/utils/test.helpers';
6 | 
7 | const suite = await createTestSuite();
8 | 
9 | describe('publicProcedure', () => {
    ^
TypeError: Cannot convert a symbol to a string
      at /publicProcedure.test.ts:9:1
-------------------------------


 0 pass
 1 fail
 1 error
Ran 1 tests across 1 files. [3.66s]
Debugger detached.

@RiskyMH RiskyMH added vscode Something to do with the VSCode extension debugger Something to do with `bun --inspect` or the debugger labels Nov 26, 2024
@RiskyMH
Copy link
Contributor

RiskyMH commented Nov 26, 2024

The main issue should be fixed in canary, but people have reported it still slow afterwards.

bun upgrade --canary

@LeulAria
Copy link

im still facing issue even after

bun upgrade --canary
$ bun run --hot src/server.ts --inspect
80 |     return `\x1B[1m\x1B]8;;${url}\x1B\\${url}\x1B]8;;\x1B\\\x1B[22m`;
81 |   return url;
82 | }, reset = function() {
83 |   if (enableANSIColors)
84 |     return "\x1B[49m";
85 | }, notify = function(unix) {
                         ^
ENOENT: Failed to connect
   errno: 2
 syscall: "connect"

      at internal:debugger:85:21
      at internal:debugger:100:13

@ace3
Copy link

ace3 commented Nov 28, 2024

❯ bun --version
1.1.38
it's fixed on this version ( i'm on Darwin )

thank you

@pipisasa
Copy link

The main issue should be fixed in canary, but people have reported it still slow afterwards.

bun upgrade --canary

I had the same problem. It was fixed when I updated Bun to 1.1.38

@LeulAria
Copy link

1.1.38 work's fine for me as well, loving bun <3

@ScreamZ
Copy link
Author

ScreamZ commented Nov 28, 2024

@RiskyMH Nice, but shouldn't also be fixed in the VSCode extension, not a big fan of using canary version… :/

Any ETA on release ? :)

@lunfardo
Copy link

It fixed it for me as well. I can also confirm that it runs slower than in the Windows Terminal

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

No branches or pull requests

9 participants