With the newer versions of Armory there’s now an option to select a different code editor for use with Armory. The included installation of Kode is cool but I’m already an avid VSCode user. Is there a method for setting up VSCode to work with Armory with all the Kode bells and whistles? Thanks!
I’ve been having a go at this. You need to install haxe itself (on Mac I used homebrew) but there are installers on the site. Then in VSCode extensions marketplace there is a haxe pack which installs debugger and a few other bits. So far been good. Not sure I have it all correct so happy to share notes etc.
Nice! I’ve installed the extension and auto-complete works well it seems. I’m curious though: Is it difficult to get the debugger up and running? Please forgive my nescience as I’m pretty new to this type of thing and not sure where to start. Is it possible to setup tasks and launch a project game from within VSCode, hook onto an already running game, etc.? Anyway, thanks for the reply, @AnadinX!!!
Actually not tried to use the debugger yet. I really should but have not made anything complex enough to do so. Funnily instead I hooked up values to canvas text objects
Ah, k. Cool, if you make any progress I’d love to hear about it. Thanks again at the very least for giving me hope!
Hey how did you get the autocomplete working. I can’t seem to get it to load .hxml file that is generated by the building the project in Armory. I’ve tried using the Haxe extension pack and the Kha extension pack. Is there something I’m missing, I’ve spent so many hours on this now and I still can’t figure it out.
Does completion work for regular Kha projects for you? It should work right away via the Kha extension pack without any configuration.
P.S.: The Kha extension pack is a superset of the Haxe extension pack.
The Kha extension pack does work out of the box for plain Kha projects, but not Armory projects. I think it has a problem with armory games because the build folder isn’t
build it is
I also tried to figure out how to get just the normal Haxe completion provider to work. I tried to set the display configuration to the
project-krom.hxml file generated by a Kha build. That almost works but it won’t find the
krom-resources/files.json file unless you modify the export path from to include the full path from the project root instead of the relative path from the
.hxml file. ( For example,
-js build_project_name/debug/krom/krom.js instead of
-js krom/krom.js ). After that completion will work if you use the normal Haxe plugin.
I created a pull request for the Kha VSCode plugin that lets you configure the Kha build dir and fixes completion for Armory games. My first step into VSCode plugins.
I’m still not sure if I can get the debugger working yet, but that could be something on my side. I’m going to keep working on it.
Ha, for some reason GitHub didn’t send me any mails about that repo and now I see three pull requests just lingering there. Good thing you mentioned it.