ts-defold / defold-vscode-build

Build, Run & Package Defold projects from Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ts-defold.defold-vscode-build
MIT License
14 stars 0 forks source link

Improve Debugging Experience #4

Open thejustinwalsh opened 1 year ago

thejustinwalsh commented 1 year ago

Currently, you must run the project at least one time before the project is in a state that can be debugged.

We need to ensure that dependencies are copied before debugging. This may require a new task to depend on. I do not recall why I did not copy dependencies on the build step initially, and it may have been an attempt to speed up the build step.

When running on Windows, the launch.json file does not work as is, and demengine.exe expects a relative path to the game's compiled project file. We need to investigate if we can pass a file:// URL to dmengine or if we must use relative paths; I believe the drive letter on Windows is causing the issue.

astrochili commented 1 year ago

Hi!

Din't try to proivide full path to dmengine but it's okay with relative. There is a problem with full paths on Windows that VS Code transforms the disk letter to lowercase.

As I know you also use local lua debugger at the moment so this is from my launcher configuration:

        'windows': {
            'program': { 'command': 'build\\launcher\\dmengine.exe' },
            'args': ['build\\default\\game.projectc']
        },

Also check out the launcher preparing, which may also be useful.

thejustinwalsh commented 1 year ago

@astrochili thanks for the info and tips, I will look further into this info ASAP!