-
Notifications
You must be signed in to change notification settings - Fork 130
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
Feature request: Improve output console color scheme #1127
Comments
This user is a long-time Spring developer on VS Code and I have interviewed him previously. He has provided valuable information back then. @Eskibear do you know this is something we can achieve, and is this something more like for the central VS Code team to do than us? |
I think SpringBoot Dashboard can automatically append "--spring.output.ansi.enabled=ALWAYS" to the launch args when launching spring app from spring dashboard view. |
Technically it's feasible, but it looks a bit strange to me, as I want the extension to be as transparent as possible. What if I have non-Spring projects and I want to add args for multiple projects in batch? Can it be a setting of Java debugger extension, something like "java.debug.extra.args.to.append", and users can set explicitly by their own. |
Java debugger is more generic, not for spring only. That's why I suggest doing it in SpringBoot Dashboard extension because it's dedicated for spring app. And SpringBoot Dashboard is using programmatic way to launch app, it's doable to auto append some extra args. |
One possible way is to have a global setting for this in Spring Boot dashboard and make it disabled by default. People who need it can turn it on and make it enabled. |
That's why I'm thinking about the possibility doing it in debugger, if there's such use case.
Yes, technically no problem, as I mentioned above. What I'm concerning about is, this is too specific. Now we add a setting to always append "--spring.output.ansi.enabled=ALWAYS" for all projects, what if someone else coming to request adding another arg, e.g. "--whatever.other.property=value"? Do we add one more setting just dedicating for that? I doubt it.
What I prefer is this, in this case you can set it to "--spring.output.ansi.enabled=ALWAYS", and it also has good extensibility, that you can set whatever args as you wish. The setting can be implemented in Spring extensions of course, but what if non-spring developers also need this feature (aka. adding args for all projects instead of set up for each)? That's why I'm thinking whether Java debugger is the final proper place to go. |
I understand your point. The debugger currently supports customizing For me, it's safe to do this in Spring tools since "--spring.output.ansi.enabled=ALWAYS" is a common argument for all spring projects. |
@slobodanc93 Another workaround is to add |
Thank you all for your suggestions. |
For Spring Boot projects, the debug output console should have a nice coloring theme by default, which is not the case currently.
With default settings, all text is a single color which is not very readable.
There is a related StackOverflow question regarding this: https://stackoverflow.com/questions/62280290/provide-color-theme-to-the-java-process-console-in-the-terminal-of-vscode-whil
Currently, there are two (easy, but not scalable) ways how to achieve the desired coloring:
spring.output.ansi.enabled=ALWAYS
toapplication.properties
file -> The issue with this approach is that it has to be set up for each project and it just adds unnecessary complexity to application.properties."args": "--spring.output.ansi.enabled=ALWAYS"
in launch.json -> This issue with this approach is that it also needs to be set up per-project basis and it is not so easy to share configuration as .vscode directory is not within version control scope.Proposed Solution
I suggest a solution that VS Code pass
"args": "--spring.output.ansi.enabled=ALWAYS"
by default for Spring Boot projects. There should be an option to control it (on/off) maybe withinsettings.json
Before
After
@nickzhums Please review.
The text was updated successfully, but these errors were encountered: