A fork of godot-vscode-plugin with C# enhancements for Godot 4 development.
Drag nodes from the Scene Preview panel directly into your C# scripts to automatically generate node reference code.
- Open a
.tscnfile to see the Scene Preview in the sidebar - Open your C# script (
.csfile) - Drag any node from the Scene Preview into your script
- Code is automatically generated based on your preferred style
| Style | Generated Code |
|---|---|
| [Export] public | [Export] public Button MyButton { get; set; } |
| [Export] private | [Export] private Button _myButton { get; set; } |
| Lazy field (C# 14) | Button _myButton => field ??= GetNode<Button>("path"); |
| Expression-bodied | Button MyButton => GetNode<Button>("path"); |
- Normal drag → Uses your primary style
- Ctrl + drag → Uses secondary style (shows "[Alt Style]" in preview)
Set your preferred styles in VS Code settings:
Settings > Godot Tools > C# > Node Reference Style
Settings > Godot Tools > C# > Secondary Node Reference Style
Or in settings.json:
"godotTools.csharp.nodeReferenceStyle": "exportPublic",
"godotTools.csharp.secondaryNodeReferenceStyle": "lazyField"Options: exportPublic, exportPrivate, lazyField, expressionBodied
Tip: When dropping on an empty line, your default style is used automatically. No dialog needed!
View the running scene tree and inspect node properties during C# debugging - features previously only available for GDScript.
| Feature | Original Plugin | This Fork |
|---|---|---|
| Active Scene Tree | GDScript only | ✅ Works with C# |
| Node Inspector | GDScript only | ✅ Works with C# |
| Auto-refresh | GDScript only | ✅ Works with C# |
| Search/Filter | ❌ | ✅ New |
Step 1: Add --remote-debug to your launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Play",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${env:GODOT4}",
"args": [
"--remote-debug",
"tcp://127.0.0.1:6007"
],
"cwd": "${workspaceFolder}",
"stopAtEntry": false
}
]
}Step 2: Press F5 to debug. The Scene Tree Monitor auto-starts.
Step 3: Click the eye icon on any node to inspect its properties.
| Setting | Default | Description |
|---|---|---|
godotTools.sceneTreeMonitor.port |
6007 |
Port for Godot connection |
godotTools.sceneTreeMonitor.autoStart |
true |
Auto-start on C# debug |
godotTools.sceneTreeMonitor.refreshInterval |
500 |
Refresh interval (ms) |
Right-click any property in the Node Inspector and select "Edit Value" to modify it at runtime.
Supported types: int, float, bool, string, Vector2, Vector3, Vector4, Color, Transform3D, and more.
Full debug control panel for C# projects:
| Control | Description |
|---|---|
| Pause/Resume | Pause game execution from VS Code |
| Frame Step | Advance exactly one frame (when paused) |
| Live Edit | Modify node properties at runtime |
| Inspector Search | Filter properties by name |
- Godot 4.2+ (.NET version)
- VS Code with C# extension
- .NET SDK installed
- Download
.vsixfrom Releases - In VS Code:
Ctrl+Shift+P→ "Extensions: Install from VSIX..." - Select the downloaded file
- Check
--remote-debug tcp://127.0.0.1:6007is in your launch.json args - Verify port matches
godotTools.sceneTreeMonitor.portsetting - Requires Godot 4.2+
- Make sure you're dragging from Scene Preview (not file explorer)
- Target must be a
.csfile - The Scene Preview panel shows nodes from
.tscnfiles
This fork includes all features from godot-vscode-plugin:
- GDScript language support
- GDScript debugger
- Scene Preview
- GDShader support
- And more...
Issues and PRs welcome at github.com/DanTrz/godot-vscode-plugin-csharp
Based on godot-vscode-plugin by the Godot Engine community