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:

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.