⚡ Go Hot Reload
Auto-restart your Go server on file changes — like Flutter hot reload, but for Go.

✨ Features
- 🔄 Auto-restart on
.go file save (debounced)
- 🪟 Windows-native: uses
taskkill /T /F — no more bind: address already in use
- 🔍 Port conflict fix: force-kills the port before every restart
- 📊 Status bar indicator (running / reloading / error)
- 📋 Output panel with timestamps
- ⚙️ Fully configurable: entry point, env vars, debounce delay, excluded dirs
🚀 Getting Started
- Open your Go project folder (must have
go.mod)
- Press
Ctrl+Shift+P → Go Hot Reload: Start Hot Reload
- Edit any
.go file → server restarts automatically ✅
Or click ⚡ Go Hot Reload in the bottom status bar.
⚙️ Configuration
Create .vscode/settings.json in your project:
{
"goHotReload.entryPoint": ".",
"goHotReload.port": 9000,
"goHotReload.debounceMs": 500,
"goHotReload.env": {
"GIN_MODE": "debug",
"PORT": "9000"
},
"goHotReload.excludeDirs": ["vendor", "node_modules", ".git"],
"goHotReload.watchExtensions": [".go"],
"goHotReload.buildArgs": []
}
All Options
| Setting |
Default |
Description |
entryPoint |
"." |
Entry point for go run |
port |
0 |
Port your server uses (for force-kill) |
killPort |
true |
Force-kill port before restart |
debounceMs |
500 |
Wait time after last file change (ms) |
watchExtensions |
[".go"] |
File extensions to watch |
excludeDirs |
["vendor","node_modules",".git"] |
Dirs to ignore |
env |
{} |
Extra env vars for the Go process |
buildArgs |
[] |
Extra args passed to go run |
🛠 Commands
| Command |
Description |
Go Hot Reload: Start Hot Reload |
Start watching + run server |
Go Hot Reload: Stop Hot Reload |
Stop everything |
Go Hot Reload: Restart Server |
Manual restart |
🪟 Why Windows-safe?
Most Go hot-reload tools use lsof / kill — Linux-only commands that don't work on Windows.
This extension uses:
taskkill /PID xxx /T /F to kill the full process tree
netstat + findstr to find and kill processes by port
- No shell scripts, no dependencies — pure Node.js + VSCode API
📦 Install from source
git clone https://github.com/hengkeraloktzy/go-hotreload
cd go-hotreload
npm install
npm run compile
# Package as .vsix
npm install -g @vscode/vsce
vsce package --no-dependencies
# Install
code --install-extension go-hotreload-1.0.0.vsix
🤝 Contributing
Issues and PRs are welcome! If this extension helped you, consider leaving a ⭐ rating on the Marketplace.
📄 License
MIT © hengkeraloktzy