Hey, I just installed "Format on Save" and made my script wrongly formatted to see if the plugin works. Then I saved the script, but no change happened.
Context
So, to give you more context:
- I on macOS
Sonoma 14.1.1 on the Apple M1 Max CPU
- I installed gdtoolkit in my iTerm2 in Zsh with
pip3 install "gdtoolkit==4.*". When I run gdformat --version, I get gdformat 4.2.2 printed out
- I run Godot
v4.2.1.stable.official [b09f793f5]
- I downloaded the plugin within Godot and chose to not "Ignore asset root" (but the same lack of formatting was happening when I clicked the otherwise)
- I modified the script to look unformatted (see code pasted below)
- I press Cmd+S to save, no formatting happens
- But when I run gdformat manually, it formats OK (I run
gdformat day23/day_23_part_1.gd from inside godot folder of my repo)
Source code: https://github.com/beetrootpaul/advent-of-code-2023/tree/godot-format-on-save-issue -> folder godot -> script day23/day_23_part_1.gd (note the script is supposed to read day23/example1_in.txt which is ignored in the repo; you can put any txt file there)
My unformatted script:
extends Node2D
func _ready() :
var filePath = "res://day23/example1_in.txt"
#var filePath = "res://day23/puzzle1_in.txt"
var input = FileAccess.open(filePath, FileAccess.READ).get_as_text()
print_debug(input)
var lines = input.split("\n")
func _process(delta):
pass
Script as formatted by gdformat day23/day_23_part_1.gd outside the Godot / plugin:
extends Node2D
func _ready():
var filePath = "res://day23/example1_in.txt"
#var filePath = "res://day23/puzzle1_in.txt"
var input = FileAccess.open(filePath, FileAccess.READ).get_as_text()
print_debug(input)
var lines = input.split("\n")
func _process(delta):
pass
How to debug?
I wonder if it is something with my gdtoolkit installation or some macOS related issues 🤔 Is there a way in Godot (I am new to the engine) to debug "Format on save" plugin? Can I for example add some print_debug statements to it and see its output somewhere?
Screenshots
The plugin I installed:

gdformat version:

Hey, I just installed "Format on Save" and made my script wrongly formatted to see if the plugin works. Then I saved the script, but no change happened.
Context
So, to give you more context:
Sonoma 14.1.1on theApple M1 MaxCPUpip3 install "gdtoolkit==4.*". When I rungdformat --version, I getgdformat 4.2.2printed outv4.2.1.stable.official [b09f793f5]gdformat day23/day_23_part_1.gdfrom insidegodotfolder of my repo)Source code: https://github.com/beetrootpaul/advent-of-code-2023/tree/godot-format-on-save-issue -> folder
godot-> scriptday23/day_23_part_1.gd(note the script is supposed to readday23/example1_in.txtwhich is ignored in the repo; you can put any txt file there)My unformatted script:
Script as formatted by
gdformat day23/day_23_part_1.gdoutside the Godot / plugin:How to debug?
I wonder if it is something with my gdtoolkit installation or some macOS related issues 🤔 Is there a way in Godot (I am new to the engine) to debug "Format on save" plugin? Can I for example add some
print_debugstatements to it and see its output somewhere?Screenshots
The plugin I installed:
gdformat version: