Skip to content

racket-langserver didn't work in a devcontainer, and a workaround #51

@SFurnace

Description

@SFurnace

Environment

  • OS: Windows 10 + Docker-Desktop
  • VS Code Version [1.59.1]
  • Racket version [8.2]
  • Magic Racket version [0.5.7]

Error message

I use xvfb-run racket in a devcontainer, but racket-langserver doesn't work. I only get error message like that:

[Error - 下午2:22:06] Starting client failed
Launching server using command xvfb-run racket failed.

Workaround

I tried many times, and finally found if I change the serverOptions in extension.js from

        const executable = {
            command: racket,
            args: ["--lib", "racket-langserver"],
        };

to

        const executable = {
            command: racket,
            args: ["--lib", "racket-langserver"],
            options: { shell: true }
        };

then racket-langserver can work correctly. I guess vscode can communicate with the xvfb-run racket process by stdin/out, only when wrapping in a shell.

By the way, I put my devcontainer.json at here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindows

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions