Skip to content

Godots script editor overwrites code from external editor when saving (VS Code) #88399

Closed
@sventomasek

Description

Tested versions

  • Reproducible in: 4.2.1.stable

System information

Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 Ti (NVIDIA; 31.0.15.5123) - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)

Issue description

When a script is open in the Godot editor and I make changes in my external editor, the next time I save in Godot it'll save the old code from Godot's script editor. Sometimes it overwrites the code in the external editor too making me lose progress unless I had the script open in VS Code to undo the changes.

Godot.Vs.Code.Saving.Problem.mp4

Steps to reproduce

I'm not 100% sure how to consistently reproduce this but I noticed that when I get an error it opens the script in the Godot editor.

  1. make an error in a script and run the game, which should open the script in Godots script editor
  2. make changes to the script in VS Code (add an export variable so you can see if the code reverts back or not in the inspector)
  3. save in VS Code
  4. go back to Godot
  5. save the scene
  6. the code should now revert back to how it was before making the changes, which can be seen by the exported variables disappearing in the inspector

Minimal reproduction project (MRP)

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions