Error: main.lua or pdex.bin required

I am using the VS Code template found here: GitHub - Whitebrim/VSCode-PlaydateTemplate: This template will help you with autocompletion and running your code in simulator. Windows only.

When I Run the Build Task it successfully spits out a .pdx file but the setup should also launch the playdate SDK but instead I just get this error:

I do have a main.lua in my source folder and the other topics I have looked up on this had people saying they didn't "select" the source folder properly but I am not sure what that means since the project is using files in the source folder otherwise the .pdx wouldn't work?

I am able to load up the Simulator manually and load the game and run it but it would be better if I could get this template to work so I don't have to manually launch the simulator all the time.

Could you please post a screenshot of the structure of your project folder and subfolders and pdx contents?

Sure! Here it is:


Annnnd I figured it out while rubber duck debugging with a friend. Turns out I wasn't calling the simulator and I was calling the compiler in the powershell script. Problem solved!

1 Like