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

Confusing error message when run in linux vscode debug environment. #716

Open
spearson78 opened this issue Mar 30, 2024 · 0 comments
Open

Comments

@spearson78
Copy link

When running in debug mode in VS Code under Linux the Application.Run() method returns an *os/exec.ExitError . This is very confusing and makes tracking down the root cause difficult.

The issue is caused by the default debug environment in VS Code not launching in a terminal.

The issue can be solved (under linux) by using the following launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch with Terminal",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${fileDirname}",
            "console": "integratedTerminal"
        }
    ]
}

Note the integratedTerminal console setting.

The error message can be improved by returning an ErrTermNotFound in the case of an empty $TERM environment variable. Hopefully a better error message will lead users to identify the lack of a terminal as the root cause of the problem.

I have implemented this improvement and will create a pull request for this issue.

spearson78 pushed a commit to spearson78/tcell that referenced this issue Mar 30, 2024
spearson78 pushed a commit to spearson78/tcell that referenced this issue Apr 2, 2024
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

1 participant