Debugging a deployed application

I’m attempting to build a distributable version of a project that I’m working on – specifically, I’m using pdeploy to create a self-contained installer – and have hit a problem: it seems to crash when run on Windows. In order to fix this, I’d like to find out what errors, if any, are being encountered. To that end, is there either a log file somewhere that I might read, or some way of having a console appear with my game? If not, could I perhaps redirect the usual output to a file from within my game?

As related secondary questions, am I correct in thinking that directories from my original folder structure are packed into the .p3d file created as the first step of creating a distributable version, and are not unpacked when installed through the installer created by pdeploy? If so, how does this affect operations that involve, say, fetching a specific text or image file from a given sub-directory, or the creation or manipulation of new multifiles in a given directory? Thus far my game has been working in my development environment, surrounded by a structure of various folders that are used to store various files – level files, save-games, data files, etc. – and I see that this structure doesn’t seem to be extracted as part of installation, despite seeming to be present in the p3d file.

In principle, a pdeployed application runs in a more-or-less identical way to how a .p3d file runs. So if the pdeploy result crashes, then so does running the .p3d.

The resources that were originally in the .p3d are embedded into the .exe by pdeploy. They are loaded in the same fashion as how they are loaded in the .p3d: through the virtual file system. In neither environment can you write to existing files from the .p3d (without extracting them).

The log file can be found in AppData/Local/YourApp/log, I believe, though I’m not 100% certain. You could also just run as .p3d and then get the log file from the regular Panda3D runtime directory.

Ah, thank you. :slight_smile:

I managed to find the log, and it looks as though I had left and import statement for something that I had removed; I imagine that when running from my IDE it either used a .pyc that I missed or a version from elsewhere in my development folders.

As to p3d files, I honestly don’t use them, save as a step towards a self-contained version: I’m inclined to prefer just providing people with a single installer to download.

As to resources, I don’t think that I modify any that are packaged with my game; I should perhaps make note to check on those that I write after installation, such as save-games, however.

Enjoy your time off, by the way. :slight_smile: