godotengine / godotengine/godot-vscode-plugin

Lacking support for rich text print in debug console

Open
#998 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.1k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

### Godot version

4.6-stable-mono

### VS Code version

1.111.0

### Godot Tools VS Code extension version

2.6.1 (dev, i dont remember the exact commit hash)

### System information

Windows 11

### Issue description

`print_rich()` function doesn't work properly on VSCode debug console:

Image

### Steps to reproduce

Code I used to replicate this:

1. Function (in a `Utilities` autoload):

```gdscript
class_name Utilities extends Node

## Imprime un texto con el color. El color puede ser indicado por valor o por nombre
static func print_color(text: String, color: Color) -> void:
var final_color: String

if color is Color: final_color = color.to_html()

print_rich("[color=#%s]%s[/color]" % [final_color, text])
```

2. Use:

```gdscript
Utilities.print_color(
"[Rock] Roca seleccionada: %s" % Utilities.get_enum_name(element, GameConstants.Elements),
Color.TEAL
)
```

Use this or `print_rich()` directly

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.