#Editing Some Scripts in VSCode Causes Godot to Freeze

1 messages · Page 1 of 1 (latest)

cosmic thicket
#

This issue is driving me up a wall. Editing certain scripts in VSCode cause Godot to just freeze up as it tries to do something - perform autocomplete or other actions? Bizarely this isn't consistent to all of my scripts and instead only fails on certain scripts (consistently) with no real indication why it would be one script but not others.

Has anyone seen this or anything similar?

barren arch
cosmic thicket
#

I'd think that that'd perhaps be the issue but I've got plenty of scripts that do use @tool successfully without failing. Ironically some of these (like item) are not tooled.

#

And separately too, item.gd and ability.gd are not tooled - and one works and one doesn't.

#

And adding @tool to ability.gd (the one that doesn't work), doesn't automagically fix this unfortunately. I wish there were some consistency here.

barren arch
#

🤔

#

sorry can't think of anything out of the blue

cosmic thicket
#

I appreciate it. It is super weird. I half wish that it were at least consistent so that it made more sense. But I guess also I'll take a mostly operating project too rather than completely brokesville.

It just sucks. I'm nearly to the point where I'm writing code in separater gd files to then copy/paste into something like ability.gd since it is so janky

barren arch
#

Yeah sorry, but maybe other people in here will have some clues

cosmic thicket
#

The one thing that I think I've noticed is that this (as so far as I can tell) only affects certain resources.

safe sonnet
#

theres a lot of nasty stuff in the lsp tbh

#

firstly, it sometimes tries to load and parse all the scripts on your project

#

which will run the preloads in them if you have any, which then leads to it loading the resource or scene (and all its dependencies like textures, meshes, audio, etc)

#

and it will also try to find the first scene that a script is in and instantiate it (which is awful if its a big scene). then find the node its attached to and use that for better nodepath autocomplete

#

you can try to enable network/language_server/use_thread in settings

#

it will stop the freezes

#

but your autocomplete will sometimes be laggy, and the editor may occasionally crash