Skip to content

VSCode Extension (fix included): Running a debugger with custom command settings picks arguments as a run command #25072

@alex-trosh-lawhive

Description

@alex-trosh-lawhive

What version of Bun is running?

Extension: 0.0.31

What platform is your computer?

MacOS

What steps can reproduce the bug?

See PR: #24037

But also:

  1. Change .vscode/settings.json to contain the following.
  "bun.test.customScript": "bun test --timeout 1000000"
  1. Create a file sample.test.ts
import {
  describe,
  expect,
  test,
} from "bun:test"


describe("Oven test", () => {

  const isBunAwesome = true

  test("should be true", () => {
    expect(isBunAwesome).toBe(true)
  })
})
  1. Open it in VSCode/Cursor with bun extension
  2. Right click on it
  3. Click "Debug"
Image
  1. Open Debug tab, you'll see the error: "error: Script not found "1000000""
Image

What is the expected behavior?

Debugger to start and test to run with a timeout in the args.

See PR: #24037

What do you see instead?

Image

See PR: #24037

Additional information

I've submitted the PR to fix it (it's a 1-liner) and has been using it since with no other issues, but this means I have to re-build extension every new release and share it via zip file with my team. I'd prefer it to make it to mainline, thanks!

See PR: #24037

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvscodeSomething to do with the VSCode extension

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions