Using breakpoints with LUA code

I will ask if the debug API might make it into documentation one day so that perhaps a debug module could be written for vscode.

The Playdate Simulator responds to the Debug Adapter Protocol.

Here's a Playdate debugger extension for VS Code I hacked together last night: Playdate Debug - Visual Studio Marketplace

There are currently a couple known issues that I am still trying to sort out:

  • VS Code continues to display a progress bar after connecting to the debugger. The progress bar goes away after a breakpoint is hit.
  • An error message is displayed after clicking the stop button the first time. Clicking the stop button a second time correctly stops the game in the Simulator. Alternatively, hold the alt/option key when clicking the stop button to change it to a "disconnect" button.
8 Likes