Yes, thats clears my confusion, i thought there was something like “load project”,
so i had already setup anything. Thanks for the illustration !!
I think template is broken. Just running “Build and Run” without changing anything else pops up a dialog box that says “The preLaunchTask ‘Build’ terminated with exit code 1.” I haven’t been able to get break points working at all either.
All is fine as I see in my setup. Can you share the logs from the terminal tab?
What is your OS? Have you done all the setup steps with additional steps for Windows?
I did follow those steps. I just got it working. It failed because Powershell was my default terminal shell, and it kept using that regardless of whether or not I had a Bash terminal selected. The following extra steps resolved my issue:
- Open Visual Studio Code
- Press CTRL + SHIFT + P to open the Command Palette
- Search for “Terminal: Select Default Profile” (previously “Terminal: Select Default Shell”)
- Select your preferred shell. In my case I selected “Git Bash”
Great! This is the instruction which is described at the link in additional step for Windows.
I am running on a Mac, and I get a similar error to some above.
cp: ./build/temp/_unpack/x86_64-darwin/bin/dmengine: No such file or directory
cp: ./build/x86_64-osx/dmengine: No such file or directory
chmod: ./build/temp/dmengine: No such file or directory
# Launching $ ./build/temp/dmengine ./build/default/game.projectc
.vscode/defold.sh: line 366: ./build/temp/dmengine: No such file or directory
I am able to build the application but not run it. I thought I followed all the same steps as above as well.
Thanks
Sorry for the late reply, some circumstances.
Yes, Defold 1.3.7 changed the path of the dmengine file, so the error occurred.
I fixed it in 1.0.6, feel free to try.
@astrochili, Thank you for the guide! I created a VS Code extension pack with recommended extensions from your list, except the debugger since I don’t know how to use it. The pack installs 5 extensions with a single click.
And Defold annotations now also show table parameters and types for callback function parameters. In example, instead of ‘play_properties: table’ it will be ‘play_properties: { delay: number, gain: number, pan: number }’.
to me is the same thing build is empty and it gives that error
.vscode/defold.sh: line 330: .exe: command not found
cp: cannot stat ‘./build/temp/_unpack/x86_64-win32/bin/OpenAL32.dll’: No such file or directory
.vscode/defold.sh: line 341: .exe: command not found
cp: cannot stat ‘./build/temp/_unpack/x86_64-win32/bin/wrap_oal.dll’: No such file or directory
Launching $ ./build/x86_64-win32/dmengine ./build/default/game.projectc
.vscode/defold.sh: line 366: ./build/x86_64-win32/dmengine: No such file or directory
Hello! Your problem should be easy to solve. I see the YOUR-DEFOLD-PATH-HERE
phrase in your logs. Please edit the .vscode/defold.sh
and set the Defold path there according the instruction.
A bit of news.
In addition to the existing d954mas/defold-api-emmylua and mikatuo/defold-lua-annotations, I have published another annotation files generator for the Lua Language Server. But written in Lua, a language that is familiar to Defold users.
By design, it can be run on Windows, macOS and Linux. Only Lua or LuaJIT needs to be installed.
Quick Start
Install Lua and run the main.lua
script.
$ lua main.lua
By default it generates the annotations for the latest version of Defold. But you can also specify the Defold version as an argument.
$ lua main.lua '1.5.0'
As a result, you will see the api
folder with .lua
files. These are the annotations.
Automatic Releases
Thanks to the action workflows, the repository automatically checks the latest version of Defold every day and releases the new version of annotations if required.