-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Can it be made to work with VSCode? #3
Comments
Thanks for the issue and the screenshot! I definitely want to support vscode. I don't use it often, but I'll get it running to try to improve that output. The quickest thing might be disabling Log.gd's color completely, which might let vscode supply it's own colors/syntax highlighting, or at least skip the This issue is similar to a problem that happens in the terminal and browser, but in that case some colors are still supported - I have been opting-in to those via Calling these global Log funcs to update the config is a bit cumbersome - I'd like to add a proper 'Editor Settings' section for Log where you can specify the color scheme and toggle "disable_color", set "max_array_size", etc. I'll take a shot at that soon, hopefully today! |
To share some notes from my digging - I don't have much vscode experience, Log.gd relies on https://docs.godotengine.org/en/4.2/classes/[email protected]#class-globalscope-method-print-rich
It looks like the godot-vscode-plugin appends to the debug console here: As we saw in your screenshot, the output seems to be raw strings with color Unfortunately that doesn't seem to work either, tho maybe my test isn't escaped
This just prints the literal strings as we see them, so I'm not confident we'll I'll think and test more on this - sorry to not have a cleaner answer yet! Let |
Thank you for the quick reply and the new code. I will get the code and manually update your addon to disable colors for now. Regarding the Debug Console, there must be a similar addon as yours for VSCode (but unrelated to Godot). I will look for those and see how they do it. |
Glancing at the screenshots, these make use of the 'Output' panel, which seems to support colorization via ansi escape codes (or some other mechanism) - godot-vscode-extension uses the 'Debug Console', which is a slightly different beast. Some digging through godot-vscode-extension's issues makes it seem like they switched from using 'output' to 'debug console' to solve a bunch of debugger-related issues. I debated about opening an issue/discussion there to see if they had ideas for this use-case - it's probably a good idea. I got a work-in-progress of Editor Settings in place a bit ago (to make it easier to disable colors), but it needs a bit more testing before another release is ready - hopefully in the next few days I'll have a proper release for you! |
You rock. Good karma to you. |
First, thank you for developing this great addon and making it available to all.
Now, as the question says, is it possible to make it work with VSCode?
I have not been able to find out how.
Perhaps this might work? It seems to be for Visual Studio, though.
https://gist.github.com/SilentPenguin/bf24eb348c9d00c34605d1cc54318be7
The text was updated successfully, but these errors were encountered: