Aseprite Debugger for VSCode

This is an Visual Studio Code extension which adds debugging support for Aseprite scripts and extensions. I have been working on this for a while and have recently implemented enough features to release the first version!

Here are some of the main features.

Breakpoints

Set breakpoints, step through code and view stack traces.

Breakpoints

Variable Inspection

Inspect values of variables, including Aseprite objects.

Variables

Logging

View logs in VSCode Debug Console, instead of the Aseprite Console window.

Logging

Error Detection

Detect lua errors, and provide a full stacktrace of the problematic code.

Errors

Script And Extension Support

Debug either scripts or extensions.

Disclaimer:

This is still a work in progress and you might therefore encounter some issues whilst using the debugger. If this is the case you can report them here.

This is also the place to report feature requests for future versions.

Download:
visual studio marketplace
github
Download pages contain more info on setup and usage.

4 Likes

Thank you for sharing this, I’m excited to use it!

I’m not sure if I missed something, but just a heads up that my initial reaction was to run the debugger on a lua file inside of Aseprite’s script folder, which the extension seems to delete at the end.

Thanks for trying it out and for the feedback!

So this happens because the extension always assumes lua files are not located in the scripts or extensions folders, which in turn leads to the debugger copying the files to the scripts or extensions folder during debugging, and then deleting the copied files on debug end.

I had not thought of the scenario where the lua files would already be in the scripts or extensions folder, which leads to the lua files simply being deleted at the end of the debug session, and will be working to fix this as soon as possible.

The short term solution is to not have any lua files you want to debug inside the scripts or extensions folder, and instead store them somewhere else.

Edit:
Updating the extension to v0.1.3 or later should fix this problem.

2 Likes

@zarstensen
Hey I made a complete lua library for Aseprite: GitHub - RampantDespair/Aseprite-Library: A lua library for making Aseprite scripts & extensions

I wanted to reach out and let you know, perhaps it could be useful paired with your debugger?
It could provide more information when inspecting variables.
In any case, if you want to implement it into your debugger and need help don’t hesitate to let me know :slight_smile: