Guide how to turn VSCode into Defold IDE with debugger

Hi there!

I prepared some setup of VSCode settings with scripts that allow you to develop Defold games with useful features:

  • Syntax highlighting and linting.
  • Powerful IntelliSense (standard lua, Defold API, libraries, project code).
  • Building and launching the game from VSCode.
  • Debugging with breakpoints, call stacks, stepping, inspecting and evaluating.

This allows you not to use Defold Editor all the time if you are working only with the code at the moment.

Actually there isn’t much of my work here, I just put it all together and tweaked it somewhere to make it work.

Hope this helps someone. Any feedback or contribution are welcome.


Updated the repo. Added the platform selection for bundling and the ability to specify additional parameters in .vscode/ such as email, auth, mobileprovisioning, bundle-format, etc.





Updated the guide and scripts :innocent:.

Java, bob, dmengine and other necessary files will now be extracted directly from the Defold. The only setting you need to specify is the path to your Defold Editor folder.

Also excluded local lua debugger, now it is taken directly from the installed VSCode extension, which allows to keep it up to date.


Hey, when i run clean and build tasks then hit f5 it gives an error.
Here is screenshots of process.


It looks like the problem occurs at the build stage. The build reports success, but I don’t understand the error about deleting some temporary directory.

Are you sure you followed these instructions to install and configure bash on Windows?

Can anyone confirm that the script even works on Windows now? Unfortunately I don’t have Windows, but half a year ago I was getting confirmation that it worked.

Yes, i followed those instructions my default terminal is git bash. When i set back to powershell the doesn’t execute. Maybe the problem caused by bash terminal, when i try to execute some command in bash terminal it doesn’t work.

Also it looks like the spaces problem in the $script_path variable

Try to move the project to the path without spaces and if that works, I’ll take the time to fix the script.

On macOS, paths with spaces work correctly, but maybe it works differently on Windows and we need to make a handler that replaces ' ' with '\ '.

1 Like

Yes, you are right. After i changed the name of the project’s parent folder which was “Defold Projects” to “Defold_Projects” then it’s fixed. Thank you.


Please check the updated script. It should work with projects that contain spaces in their path.

But I don’t know how to make bob work on the path with spaces, looks like a java error and probably is similar to

$ "/Applications/Defold" -cp "/Applications/Defold" com.dynamo.bob.Bob distclean
Exception in thread "main" java.lang.RuntimeException: java.nio.file.NoSuchFileException: /Applications/
        at com.dynamo.bob.ClassLoaderResourceScanner.scan(
        at com.dynamo.bob.fs.ClassLoaderMountPoint.walk(
        at com.dynamo.bob.fs.AbstractFileSystem.walk(
        at com.dynamo.bob.Project.findSources(
        at com.dynamo.bob.Bob.setupProject(
        at com.dynamo.bob.Bob.mainInternal(
        at com.dynamo.bob.Bob.main(
Caused by: java.nio.file.NoSuchFileException: /Applications/
        at java.base/sun.nio.fs.UnixException.translateToIOException(
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(
        at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(
        at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(
        at java.base/java.nio.file.Files.readAttributes(
        at java.base/$Source.get(
        at java.base/$CleanableResource.<init>(
        at java.base/$CleanableResource.get(
        at java.base/<init>(
        at java.base/<init>(
        at java.base/java.util.jar.JarFile.<init>(
        at java.base/java.util.jar.JarFile.<init>(
        at java.base/java.util.jar.JarFile.<init>(
        at com.dynamo.bob.ClassLoaderResourceScanner.scanJar(
        at com.dynamo.bob.ClassLoaderResourceScanner.scan(
        ... 6 more

As you requested i test the script with spaces, it seems working.


Version 1.0.2.

  • Added the Deploy task with the [iOS / Android] selector.
  • Added the [Debug / Release] selector to the Bundle task.
  • Added *.project as ini file type to files associations.
  • Added open_bundle_folder boolean param to open the bundle folder after bundling is finished.
  • Separated texture_compression to texture_compression_debug and texture_compression_release params.