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

Outline Symbols Missing in Various Scenarios with class_name and extends Placement in GDScript #744

Closed
SirManfred opened this issue Oct 27, 2024 · 1 comment

Comments

@SirManfred
Copy link

SirManfred commented Oct 27, 2024

Godot version

4.3 stable

VS Code version

1.94.2

Godot Tools VS Code extension version

2.3.0

System information

Windows 10 Pro

Issue description

In VSCode with the Godot extension, symbols in the Outline panel only display under specific conditions involving the placement of extends and class_name declarations in GDScript files.

Instances When Symbols Work:

  • extends is on the first line, with or without class_name in the script.
  • extends is on the first line and class_name on the second line.
  • extends is on the second line, with class_name on the third line.
  • class_name is on the second line, with extends on the third line.
  • A comment is on the first line, followed by class_name on the second line and extends on the third line.

Instances When Symbols Don’t Work:

  • The first line is empty, and extends is on any other line (without class_name in the script).
  • A comment is on the first line, and extends is on any other line (without class_name in the script).
  • class_name is on the first line, and extends is on any other line.

In summary, symbols only appear if extends is on the first line in scripts without class_name. If class_name is present, extends can appear on any line, but symbols fail to display if class_name is the first line and extends appears afterward.

Expected Behavior:
Symbols should populate in the Outline regardless of the line position of class_name and extends declarations, allowing flexibility in script structure, such as placing comments or leaving the first line empty, without affecting the Outline's functionality.

Steps to reproduce

See the attached script files and try out the different scenarios listed in the description

extends Node
class_name SomeClass

var variable1: int = 1
var variable2: String = "Hello"
var variable3: bool = true

func _ready() -> void:
	print(variable1)
	print(variable2)
	print(variable3)

func _process(delta: float) -> void:
	if(variable3):
		print("Processing..." + str(delta))
		variable3 = false
		print("Done")
@SirManfred SirManfred added the bug label Oct 27, 2024
@DaelonSuzuka
Copy link
Collaborator

Duplicate of #658

@DaelonSuzuka DaelonSuzuka marked this as a duplicate of #658 Oct 27, 2024
@DaelonSuzuka DaelonSuzuka closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants