Add "Export Debug info" functionality#256
Conversation
… info zip (list of potentially interesting game files + zipped Plugins and Config folders) and corresponding UI button
…s in the game directory
ManlyMarco
left a comment
There was a problem hiding this comment.
I think it's better to open a file save dialog instead of writing straight to game directory.
Ideally Player.log would also be collected if available to deal with doorstop log redirection being turned off. This might be out of scope of this PR though since KKM doesn't handle this at all currently
. It probably would need a log path per game dictionary in InstallDirectoryHelper to work.There was a problem hiding this comment.
Pull request overview
Adds a new “Generate Debug Info” tool to KKManager to help users export troubleshooting artifacts from a selected game install.
Changes:
- Adds a new Tools menu item + click handler in the main window to trigger debug-info export.
- Introduces
KKManager.Functions.DebugInfoto generate a file tree listing, collect logs, and package BepInEx config/plugins into a nested zip. - Updates
KKManager.Coreproject references to support zip creation.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 11 comments.
| File | Description |
|---|---|
| src/KKManager/Windows/MainWindow.cs | Wires a new Tools menu click handler to start debug-info generation. |
| src/KKManager/Windows/MainWindow.Designer.cs | Adds the new Tools dropdown menu item and event hookup. |
| src/KKManager.Core/KKManager.Core.csproj | Adds compression-related assembly reference for the new zip feature. |
| src/KKManager.Core/Functions/DebugInfo.cs | Implements debug-info collection and zip packaging logic. |
Files not reviewed (1)
- src/KKManager/Windows/MainWindow.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…he KKManager working directory
|
Added a file dialog so the user can pick the location. I didn't try to handle player.log because I agree that it's a little out of scope, and I personally don't have all of the games to be able to test the feature with them, or even determine the correct location for them. I also addressed most of the points raised by Copilot, with two exceptions. Firstly, it's simply wrong in it's assement of the zip file structure behaviour, the current implementation already handles that correctly. Secondly, while System.IO.Compression.FileSystem isn't in the csproj, it does appear in the list of referenced assemblies in VS2022 and it's already ticked when I go to add it. I might be missing something though. |
|
CI build is succeeding so the assembly references are correct. |
Description
This pull request adds new entry to the Tools dropdown: "Generate Debug Info". When used, this option creates a zip in the game folder containing:
output_log.txtLogOutput.logfiles found in the game directory and subdirectoriesMotivation and Context
This pull request aims to implement the functionality discussed in (and thus close) #124
How Has This Been Tested?
I tried using this feature on multiple installs of Koikatsu, Koikatsu Sunshine, AiComi and HoneyCome. It performed as expected for all four games.
Screenshots (if appropriate):
Types of changes