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

Enable ANSI colors by default when starting the app with mix_task #422

Closed
macabeus opened this issue Jun 22, 2024 · 1 comment
Closed

Enable ANSI colors by default when starting the app with mix_task #422

macabeus opened this issue Jun 22, 2024 · 1 comment

Comments

@macabeus
Copy link

macabeus commented Jun 22, 2024

As far as I know, the built-in VS Code debug console supports all ANSI color features.

But when running the application using the mix_task task, it's disabled.

It would be good if it's enabled by default.
It avoids confusion and the need to explicitly turn it on from the application code.

How to reproduce

1 - Clone this repo:

git clone [email protected]:macabeus/vscode-elixir-ls-issue.git

It's a dummy Elixir project with .vscode/launch.json configuration to start with mix_task

2 - Open the project with VS Code

3 - Run the debugger:

image

4 - You'll can see from the debug console that the ansi_enabled is disabled, and there are no ANSI colors:

image

5 - But the VS Code debug console supports ANSI colors. If we uncomment the line from lib/application.ex, you'll can see it working as expected:

image

Environment

  • Elixir & Erlang versions (elixir --version): Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit] [dtrace]

Elixir 1.17.0 (compiled with Erlang/OTP 26)

  • VSCode ElixirLS version: 0.22.0
  • Operating System Version: darwin 23.4.0
@lukaszsamson
Copy link
Collaborator

Last time I checked on VSCode 1.85 it looked bad in both Debug console and Test results thought they supposedly added support in 1.80. On 1.90 it looks OK. Thanks for the repro

lukaszsamson added a commit that referenced this issue Jun 23, 2024
The output looks good in recent VSCode
Fixes #422
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

2 participants