Defold Kit — Visual Studio Code Extension

:smiling_face_with_three_hearts: :saluting_face: wow!amazing!thanks!

It seems you’ve triggered on something in my mind, so:

https://github.com/defold/extension-safearea/pull/16/files
https://github.com/defold/extension-review/pull/10/files
https://github.com/britzl/defold-sharing/pull/33/files
https://github.com/britzl/extension-imgui/pull/71/files

The last one (imgui annotations) is really big, but just as useful. I hope it will be supported somehow in the future releases.

UPDATE: Oops, someone also made annotations for imgui a year ago.

7 Likes

I’m so annoyed with these extensions. Yes, they’re great but none of them cover all important cases. They’re either missing:

  • Debugger
  • Hot Reload
  • Console Output

Defold Kit covers 1 & 3 but is missing 2. Defold Buddy is missing 1 & 3 but has 2. Buuuut, Defold Buddy only works when the game is ran in the Defold editor. And Defold Kit’s debugging only works when it’s ran from VS Code.

You see the problem here? Both can’t be used together because they break the workflow.

Defold’s code editor stinks. Only thing worse than it is Godot’s code editor. But they have better support for external IDE’s.

The new Defold Intellij plugin is also broken. Doesn’t work for code Hot Reload (DMEngine.exe process already in use..etc.).

Sublime plugin came the closest to covering everything. But it has a serious issue with the console lag and haven’t figured how debugging is suppose to work yet.

Like I get it, small games only. If I were making them or just tech demos then maybe the above wouldn’t concern me as much. But I can’t write 1000’s lines of code in the Defold Editor. Especially with Lua.

I’ve spent way too much time trying to get these IDE’s to work with all 3 of my cases.

Lastly, I think the Hot Reload is mostly overlooked for annotations and other syntactic sugars.. which I think is a grave mistake. Defold imo is popular for the fast builds and Hot code reloads.

/end rant

3 Likes

If you mean this one:

Edit: I forgot that there is a setting for refreshing the console content. You can set it using Package->Settings->Defold

// Interval in seconds for refreshing console content
 "console_refresh_interval": 2.0,
 // Automatically check for annotation updates on startup
"auto_check_annotations": true,
// Maximum number of lines to show in console (prevents slowdown)
"console_max_lines": 1000
1 Like

I hate to rant, especially since it’s a free game engine, and everyone is working hard on it already. I really appreciate the effort of everyone who has had a hand in building this engine and all of its extensions.

However the built-in editor is so far behind any modern editor/IDE that I don’t think it’s worth using for a serious project. There are too many basic features missing.

As much as I like some of the parts of Defold, I don’t think I would continue using this game engine if DefoldKit stopped working. Not that anyone would care, but it’s just my 2 cents.

I’m using vscode with defold kit and love it.

But is it easy to solve?

  • To use hot reloading, you should run the game from Defold Editor and debug it there.
  • To debug the game in VSCode, you should run it in VSCode without Defold Editor hot reloading.

Thus, hypothetically, there are only two ways to call hot reloading in VSCode:

  1. Call hot reload via HTTP in Defold Editor, as Buddy already does, but this requires running and debugging the game in Defold Editor.
  2. Implement another independent resource tracking system in the VSCode extension and load new resources into dmengine, as Defold Editor does. At the moment, this does not seem trivial to me.

I mean, if it’s enough to just add Defold Editor commands to Defold Kit via HTTP, then okay, there’s an issue for that. It will probably turn out to be what we currently have in the Defold Sublime Text Package.

But I’m still not sure if it will help in any way when there is Buddy with this functionality, so I’m not rushing to do it. For now, you either run Defold Editor commands without “switching windows”, or you debug in VSCode, but so far these are two completely different workflows: one has hot reload, while the other requires writing it from scratch.

Please correct me if I am wrong, but I really don’t know how to merge debug, output and hot reload in VSCode without fundamental changes.

Quick question: is defold kit still supported for the Defold 1.12.2 and VSCode 1.111 version?

I’m asking because I’m trying currently to set it up with a clean VSCode and then defold-kit extension install and cannot get it to run/debug from VS Code on Windows.

After setting it up with the initial Defold Kit: Setup prompts the .vscode/tasks.json looks like this

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "shell",
			"id": "shell,exit${command:defoldKit.build},",
			"problemMatcher": [],
			"label": "Defold Kit: Build to Launch"
		}
	]
}

where id is deemed to be not allowed by VSC and launch.json just stays empty :man_shrugging:

Hitting F5 yields an error “Could not find the task: ’Defold Kit: Build to Launch’“ and an output of:

The task provider for “defoldKit” tasks unexpectedly provided a task of type “shell”.

Anyone having the same issue or able to “hint me“ in the right direction?

Help would be greatly appreciated :slight_smile:

Hi

The task provider for “defoldKit” tasks unexpectedly provided a task of type “shell”.

is known issue to ignore and probably not a reason of your problem.
Please share the Output pane by selecting Defold Kit output in the dropdown.

Hi @astrochili

you find the Defold Kit output below. As I tried it again I saw that a .internal/lib folder seems to be needed (“…\test_dkit\.internal\lib’ not found, unpacking extensions skipped“), but just naively creating it does not change the outcome for me and hitting F5 still yields “Could not find the task: ‘Defold Kit: Build to Launch‘“

Defold Kit Output no lib folder

2026-03-16 11:30:20.891 [info] Extension ‘Defold Kit’ is deactivated

2026-03-16 11:30:44.866 [info] Configuration

- config.workspace: ‘d:\AuxPrograms\Defold\projects\test_dkit’

- config.resources: ‘c:\Users\flori\.vscode\extensions\astronachos.defold-2.1.10\resources’

- config.workspaceStorage: ‘c:\Users\flori\AppData\Roaming\Code\User\workspaceStorage\41c29f9d7de42c2bb39cf8b7bd86041d\astronachos.defold’

- config.globalStorage: ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold’

- config.defold: ‘d:\AuxPrograms\Defold’

2026-03-16 11:30:44.866 [info] Last global migration version is 2.1.10. No need to migrate.

2026-03-16 11:30:44.866 [info] Starting workspace migration from 2.0.5 to 2.1.10.

2026-03-16 11:30:44.866 [info] Extension ‘Defold Kit’ is activated

2026-03-16 11:30:44.866 [info] No setup has ever been done in this workspace yet, so let’s suggest setup Defold Kit

2026-03-16 11:30:44.866 [info] Suggest to setup Defold Kit

2026-03-16 11:30:47.569 [info] Command ‘defoldKit.setup’ is called

2026-03-16 11:30:47.570 [info] Configuration

- config.workspace: ‘d:\AuxPrograms\Defold\projects\test_dkit’

- config.resources: ‘c:\Users\flori\.vscode\extensions\astronachos.defold-2.1.10\resources’

- config.workspaceStorage: ‘c:\Users\flori\AppData\Roaming\Code\User\workspaceStorage\41c29f9d7de42c2bb39cf8b7bd86041d\astronachos.defold’

- config.globalStorage: ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold’

- config.defold: ‘d:\AuxPrograms\Defold’

2026-03-16 11:30:49.503 [info] The Defold Editor path is updated to ‘d:\AuxPrograms\Defold’

2026-03-16 11:31:03.321 [info] Copying from ‘c:\Users\flori\.vscode\extensions\astronachos.defold-2.1.10\resources\debugger\debugger.lua’ to ‘d:\AuxPrograms\Defold\projects\test_dkit\debugger\debugger.lua’

2026-03-16 11:31:03.335 [info] Copying from ‘c:\Users\flori\.vscode\extensions\astronachos.defold-2.1.10\resources\debugger\debugger.script’ to ‘d:\AuxPrograms\Defold\projects\test_dkit\debugger\debugger.script’

2026-03-16 11:31:03.340 [info] Found debug configuration for extension: ‘tomblind.local-lua-debugger-vscode’

2026-03-16 11:31:03.689 [info] Applied debug configuration for extension: ‘tomblind.local-lua-debugger-vscode’

2026-03-16 11:31:03.690 [info] Found settings for extension: ‘sumneko.lua’

2026-03-16 11:31:04.012 [info] Applied settings for extension: ‘sumneko.lua’

2026-03-16 11:31:04.012 [info] Found settings for extension: ‘astronachos.defold’

2026-03-16 11:31:04.038 [info] Applied settings for extension: ‘astronachos.defold’

2026-03-16 11:31:04.053 [info] The ‘.vscode/extensions.json’ file is not found, it will be created.

2026-03-16 11:31:04.053 [info] Stringifying JSON to text

2026-03-16 11:31:04.053 [info] Writing the ‘astronachos.defold’ recommendation to the ‘.vscode/extensions.json’ file

2026-03-16 11:31:06.197 [info] Syncing Defold API annotations

2026-03-16 11:31:06.197 [info] Starting fetch Defold annotations

2026-03-16 11:31:06.210 [info] Global storage folder exists, no need to create

2026-03-16 11:31:06.210 [info] Defold version: 1.12.2

2026-03-16 11:31:06.210 [info] Defold annotations repository: astrochili/defold-annotations

2026-03-16 11:31:06.210 [info] Direct annotations url: https://github.com/astrochili/defold-annotations/releases/download/1.12.2/defold_api_1.12.2.zip

2026-03-16 11:31:06.210 [info] Network request GET: ‘https://github.com/astrochili/defold-annotations/releases/download/1.12.2/defold_api_1.12.2.zip

2026-03-16 11:31:06.619 [info] Network response OK’

2026-03-16 11:31:06.619 [info] Cleaning directory: c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api

2026-03-16 11:31:06.624 [info] Writing response data to ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api\annotations.zip’

2026-03-16 11:31:06.673 [info] Initializing Zip instance for ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api\annotations.zip’

2026-03-16 11:31:06.673 [info] Extracting lua files from ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api\annotations.zip’ to ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api’

2026-03-16 11:31:06.673 [info] Deleting ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api\annotations.zip’

2026-03-16 11:31:06.676 [info] Updating annotations paths in workspace settings: ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold’

2026-03-16 11:31:06.676 [info] Adding ‘~\AppData\Roaming\Code\User\globalStorage\astronachos.defold’ to ‘Lua.workspace.library’

2026-03-16 11:31:06.700 [info] Syncing dependencies annotations

2026-03-16 11:31:06.704 [info] Dependencies folder ‘d:\AuxPrograms\Defold\projects\test_dkit\.internal\lib’ not found, unpacking extensions skipped

2026-03-16 11:31:06.704 [info] Command ‘defoldKit.setup’ is finished

Defold Kit Output created lib folder

2026-03-16 11:42:44.646 [info] Command ‘defoldKit.setup’ is called

2026-03-16 11:42:44.647 [info] Configuration

- config.workspace: ‘d:\AuxPrograms\Defold\projects\test_dkit’

- config.resources: ‘c:\Users\flori\.vscode\extensions\astronachos.defold-2.1.10\resources’

- config.workspaceStorage: ‘c:\Users\flori\AppData\Roaming\Code\User\workspaceStorage\41c29f9d7de42c2bb39cf8b7bd86041d\astronachos.defold’

- config.globalStorage: ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold’

- config.defold: ‘d:\AuxPrograms\Defold’

2026-03-16 11:42:48.654 [info] The Defold Editor path is updated to ‘d:\AuxPrograms\Defold’

2026-03-16 11:42:51.770 [info] No need to copy ‘debugger\debugger.lua’, already exists

2026-03-16 11:42:51.777 [info] No need to copy ‘debugger\debugger.script’, already exists

2026-03-16 11:42:51.778 [info] Found debug configuration for extension: ‘tomblind.local-lua-debugger-vscode’

2026-03-16 11:42:51.778 [info] Launch configuration ‘Defold Kit’ with type ‘lua-local’ already exists, adding skipped.

2026-03-16 11:42:51.778 [info] Applied debug configuration for extension: ‘tomblind.local-lua-debugger-vscode’

2026-03-16 11:42:51.778 [info] Found settings for extension: ‘sumneko.lua’

2026-03-16 11:42:51.928 [info] Applied settings for extension: ‘sumneko.lua’

2026-03-16 11:42:51.928 [info] Found settings for extension: ‘astronachos.defold’

2026-03-16 11:42:51.939 [info] Applied settings for extension: ‘astronachos.defold’

2026-03-16 11:42:51.941 [info] Parsing JSON from text

2026-03-16 11:42:51.941 [info] The ‘.vscode/extensions.json’ file already has the ‘astronachos.defold’ recommendation

2026-03-16 11:42:53.166 [info] Syncing Defold API annotations

2026-03-16 11:42:53.166 [info] Starting fetch Defold annotations

2026-03-16 11:42:53.170 [info] Global storage folder exists, no need to create

2026-03-16 11:42:53.170 [info] Defold version: 1.12.2

2026-03-16 11:42:53.170 [info] Defold annotations repository: astrochili/defold-annotations

2026-03-16 11:42:53.170 [info] Direct annotations url: https://github.com/astrochili/defold-annotations/releases/download/1.12.2/defold_api_1.12.2.zip

2026-03-16 11:42:53.170 [info] Network request GET: ‘https://github.com/astrochili/defold-annotations/releases/download/1.12.2/defold_api_1.12.2.zip

2026-03-16 11:42:53.652 [info] Network response OK’

2026-03-16 11:42:53.652 [info] Cleaning directory: c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api

2026-03-16 11:42:53.658 [info] Writing response data to ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api\annotations.zip’

2026-03-16 11:42:53.705 [info] Initializing Zip instance for ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api\annotations.zip’

2026-03-16 11:42:53.705 [info] Extracting lua files from ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api\annotations.zip’ to ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api’

2026-03-16 11:42:53.705 [info] Deleting ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold\defold_api\annotations.zip’

2026-03-16 11:42:53.717 [info] Updating annotations paths in workspace settings: ‘c:\Users\flori\AppData\Roaming\Code\User\globalStorage\astronachos.defold’

2026-03-16 11:42:53.717 [info] The ‘Lua.workspace.library’ already has this annotations path, no need to touch

2026-03-16 11:42:53.717 [info] Syncing dependencies annotations

2026-03-16 11:42:53.722 [info] Creating the workspace storage: c:\Users\flori\AppData\Roaming\Code\User\workspaceStorage\41c29f9d7de42c2bb39cf8b7bd86041d\astronachos.defold

2026-03-16 11:42:53.723 [info] Cleaning directory: c:\Users\flori\AppData\Roaming\Code\User\workspaceStorage\41c29f9d7de42c2bb39cf8b7bd86041d\astronachos.defold

2026-03-16 11:42:53.726 [info] Reading list of dependencies in game project.

2026-03-16 11:42:53.727 [info] Parsing game project dependencies…

2026-03-16 11:42:53.727 [info] Reading extensions folder: d:\AuxPrograms\Defold\projects\test_dkit\.internal\lib

2026-03-16 11:42:53.728 [info] Filtering *.zip files according project dependencies…

2026-03-16 11:42:53.730 [info] Updating annotations paths in workspace settings: ‘c:\Users\flori\AppData\Roaming\Code\User\workspaceStorage\41c29f9d7de42c2bb39cf8b7bd86041d\astronachos.defold’

2026-03-16 11:42:53.730 [info] Adding ‘~\AppData\Roaming\Code\User\workspaceStorage\41c29f9d7de42c2bb39cf8b7bd86041d\astronachos.defold’ to ‘Lua.workspace.library’

2026-03-16 11:42:53.799 [info] Command ‘defoldKit.setup’ is finished

Feedback and hints are greatly appreciated :folded_hands:

Cheers

1 Like

It says this because there are no dependencies (I guess there are no dependencies?) and it’s okay.
I don’t see anything strange in your logs. Even can’t find calling the build task… probably VSCode really can’t find it.

Ah, I guess I see the problem, sorry for not paying attention.

To build you should strart the debugger, not the task. This build task is really technical and a bit tricky thing. I tried to hide it by any ways but it still available I see…

It was created only as a preLaunchTask for the launch config. You don’t need the tasks.json file, delete it and just launch the debugger.

Have you accidentally forgotten this important checkbox?

It should create the .vscode/launch.json like this one:

{
    "configurations": [
        {
            "name": "Defold Kit",
            "type": "lua-local",
            "request": "launch",
            "stopOnEntry": false,
            "verbose": false,
            "internalConsoleOptions": "openOnSessionStart",
            "scriptRoots": [
                "/Users/astro/Library/Application Support/Code/User/workspaceStorage/13d7275d414d6636246c7f98532b124c/astronachos.defold/"
            ],
            "program": {
                "command": "build/defoldkit/dmengine"
            },
            "args": [
                "build/defoldkit/game.projectc"
            ],
            "windows": {
                "program": {
                    "command": "build\\defoldkit\\dmengine.exe"
                },
                "args": [
                    "build\\defoldkit\\game.projectc"
                ]
            },
            "preLaunchTask": "Defold Kit: Build to Launch"
        }
    ]
}
1 Like

No, I always kept all checked.

It just doesn’t do that (on my clean install). .vscode/launch.json is not created after running Defold Kit: Setup. If I create an empty .vscode/launch.json and run Defold Kit: Setup again, nothing gets added.

I get the VS Code option of “Add Configuration” though…

and if I click it it brings up a workspace.json where the entry you mentioned above resides

Have you experienced this scenario before? I mean just as a heads up, because anyways: when I copied the configurations entry from the workspace.json to launch.json and then hit F5…heureka!, I can debug from VS Code now :tada:

It works, so thank you very much for your support @astrochili :raising_hands:

It’s interesting because to be honest I don’t have any experience with workspaces in VSCode. Defold Kit was designed for project folders … and I can’t imagine what’s happens in the workspace. The first thing I see that it creates the launch config in the workspace folder but not in the project folder :smile:

I’ve created the issue to not miss it.

Hi!

Hot-reload is a critical feature for convenient development.
It’s a standard approach to start the game once through the Defold editor and then continue coding in VSCode without having to constantly switch between windows.

Please add this functionality.
It’s also important to support ts-defold (like the Buddy extension does) it just needs to wait for TypeScript to be transpiled to Lua before sending the hot-reload command.