New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow exporting config and debug.txt with one click (on all platforms) #13605
Conversation
it's a very cool idea but i prefer calling it "Export debug info" |
On desktop, the debug info is copied to the clipboard silently. If the button was named "Export debug info" instead of "Copy debug info", the user wouldn't know that the debug info is copied to the clipboard and they would think that the button does nothing. Therefore, I think the current name is better. |
It should be called "Share" or "Send" debug info on Android, as those are the specific terms on Android. On desktop, "Copy" makes the most sense as that's what it's done - see above reply |
It's currently called "Share debug info" on Android, exactly as you're suggesting. |
Please rebase, this is near the top of my review list |
Rebased. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably limit the lines of debug.txt to 30 lines
We should try to get as many things from the bug report template into here as possible, which includes:
That last one will probably require porting code, so feel free to skip |
Done, but limited to 64 instead of 30 lines.
Done.
I hereby skip that :) |
I think the "debug info" now contains enough information to be useful. Would it be possible to merge this as-is and, if someone wants to do that, add more information in future PRs? |
@grorp rebase needed |
@@ -195,6 +195,27 @@ function string.split(str, delim, include_empty, max_splits, sep_is_pattern) | |||
return items | |||
end | |||
|
|||
-------------------------------------------------------------------------------- | |||
function string.tail(str, num_lines) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very important, but if we're gonna expose this, I'd probably try to give it a clearer name ("tail" may also be in reference to characters rather than lines). I'd also probably implement this using a reverse numeric for: for index = #str, 1, -1 do local char = str:sub(index, index)
...
There's a conceptual problem with this PR: Do we actually want minetest.conf/debug.txt at the beginning of every issue, together with the version information? While this would be useful for many bugs, it would be unnecessary noise for some issues, especially as you'd have to scroll down to reach the actual issue content. Having minetest.conf/debug.txt attached as downloadable files could be better. If you agree, I can think of three options:
|
Maybe option 3? Option 2 sounds like a headache privacy-wise, not sure about option 1. Regardless, I agree that minetest.conf and debug.txt aren't needed most of the times. Minimal tests are way more important |
I'll go with option 3 and open a new PR with https://github.com/grorp/minetest/tree/about-tab-4 some day |
I just want to note that the current share debug log button is the only good way to get the debug log on Android, without needing a computer. So that needs to remain |
For fixing bugs reported by users, you often need their
minetest.conf
anddebug.txt
. However, it can be difficult for users to obtain these files. Desktop users have to find out the location of the Minetest user data directory on their platform. Android users can exportdebug.txt
with a button in the app, but gettingminetest.conf
requires a computer with ADB installed if you have a recent Android version.This PR adds a button for exporting so-called "debug info" to the about tab. This button exists on all platforms. On desktop, it copies to the clipboard, on Android, it opens a share pop-up.
This is how the new about tab looks on desktop:
This is how the new about tab looks on Android:
The so-called "debug info" consists of Minetest version, platform, active renderer,
minetest.conf
anddebug.txt
. Here's an example:Inspired by the discussion starting at https://irc.minetest.net/minetest-dev/2023-06-14#i_6091167. Builds on top of #12370.
To do
This PR is a Ready for Review.
How to test
Look at the about tab, verify that it looks as shown in the screenshots. Press the "Copy debug info" / "Share debug info" button and verify that the output is useful for bug reports.
Q&A
Where did the active renderer text go?
I had to remove it to make space for the new button. However, I think that the active renderer isn't relevant for the average user anyway. If you really need this information, you can still get it via the "Copy debug info" button.
Why does the "minetest.net" button now use the full available width?
Because the text on this button was cut off on my Android device.