[Suggestion]: "Copy card debug info" Button?


(Ignore that awful margin)

{
   "revlog": [
      {
         "time": "1735568627",
         "reviewKind": "RESCHEDULED",
         "interval": 32313600,
         "ease": 823,
         "memoryState": {
            "stability": 151.71439,
            "difficulty": 7.512624
         }
      },
      {
         "time": "1710981744",
         "reviewKind": "REVIEW",
         "buttonChosen": 3,
         "interval": 72662400,
         "ease": 856,
         "takenSecs": 2.497,
         "memoryState": {
            "stability": 151.71439,
            "difficulty": 7.512624
         }
      }, //... They continue like this but it gets long.
   ],
   "cardId": "1574587965678",
   "noteId": "1574587965575",
   "deck": "/::Ultimate Geography",
   "added": "1574587965",
   "firstReview": "1666614272",
   "latestReview": "1735568627",
   "dueDate": "1743255281",
   "interval": 374,
   "ease": 2500,
   "reviews": 11,
   "averageSecs": 3.3706367,
   "totalSecs": 37.077003,
   "cardType": "Map - Country",
   "notetype": "Ultimate Geography",
   "memoryState": {
      "stability": 151.714,
      "difficulty": 7.513
   },
   "fsrsRetrievability": 0.8282724,
   "customData": "{\"v\": \"reschedule\"}",
   "preset": "Geography",
   "desiredRetention": 0.8
}

Is something like this a good idea? I’d hope it would reduce guess-work on the my intervals are too long problems and the like. If it is a good idea I could of course fetch parameters and stuff. Right now this is just the information available immediately to the “card info” screen.

4 Likes

I like it but think that the screenshots are more intuitively understandable compared to json text (except, of course, the json text could be fed into a “visualizer”).

At least for me it’s way easier to “parse” a table layout with my eyes than to find all relevant data in a possibly very large json object.

3 Likes

I’ve been playing with how to make something similar to David’s “Health Check” and had a similar idea.

I think it could be useful to provide “debug info” that people can paste into the forum.

My idea was to have checks return summaries of what is wrong that could be pasted into the forum:

2 Likes

Wow that’s looking great!

Just to check, this wouldn’t render “copy card debug information” obsolete would it?
I’m also curious how the checks would detect problems. Are they in depth checks on all the cards, do they just check the preset to make sure you don’t have a desired retention of 1.1 or something, or is that yet to be decided?

N.B. It is very early work. That’s just a mock-up. The only “real” check & automated fix I have implemented at the moment is “is FSRS turned on?”.

I’m still in the playing around phase. I don’t know if I’ll ever get to the point where I think it is worth sharing the addon / proposing to integrate with Anki.

It wouldn’t necessarily make “copy card debug information” obsolete, but hopefully we could write automated checks that would mean most of the time you don’t need to share the entire revlog of a card.

Here is the list of potential checks I have come up with so far:

Potential checks

One-off Tips

  • Tip: Hard Misuse
  • Tip: The Desired Retention trade-off
  • Tip: Create different Presets for different topics/kinds of card?

Global

  • Warn: FSRS is off
  • Tip: Suspicious numbers of Presets
    • The single mega Preset
    • One Preset per Deck (many Decks)

Revlog

  • Warn/Error: Weird review data that might trip FSRS up
    • Lots of same-day reviews?
    • 313131…?
  • Tip: Suspend leeches

Preset

  • Warn: Sensible learning steps
    • Not too many (1-2?)
    • Must be completable in a single day (12h?)
    • Not blank?
  • Warn: Your desired retention is lower than recommended (from CMRR)
  • Tip: You can reduce your Desired Retention (from CMRR)
  • Tip/Warn?: Your desired retention is very high
  • Warn/Error: Suspicious parameters
    • Params that will cause weird behavior

Deck

  • Warn: You are not meeting your desired retention
    • Need to split Presets?
    • Change to “Retrieveability Desc” if you have a backlog?
    • Reschedule cards after turning on FSRS/ a significant change in FSRS params?
  • Tip: You have a backlog - what to do
  • Tip: You have hit your review/ new card limit (including sub-deck behaviour)

Edit:

Full Screenshot of mock-up

2 Likes

I think we can include backticks in the debug info itself so that when people copy-paste they automatically have a code-block (assuming markdown support):

```
the debug info would go here...
```
1 Like

Thats a good idea. One of my concerns with this is that people will paste these huge blocks of text everywhere and it will be annoying to scroll past. That may not be a concern on this forum because with the markdown it gets its own separate scrollbar, but on discord/reddit it could get annoying.

2 Likes

I guess another approach would be to automatically upload to something like pastebin or a custom made help/visualiser website like @Anon_0000 said. The user would then just be given a link to paste in the forum/discord/reddit.

This adds a lot of complexity though and has its own problems.

2 Likes

I’m with @Anon_0000 on this one – that’s much harder to read and understand than just a screenshot of the Card Info, and anything you have to scroll [picture that with 20+ reviews! :see_no_evil: ] can’t be skimmed at-a-glance. There are times when a screenshot is un-/less helpful – FSRS parameters, card templates – but Card Info is lovely as a screenshot. Getting it in a more complicated format isn’t going to help helpers.

If you’re looking for a project though – card templates would actually be a great one! A “Copy as Markdown” button like AnkiDroid added – that grabs the front-back-Styling ready to be pasted without the Forum parsing the tags? :tada:

Front template

{{Front}}

Back template

{{FrontSide}}

<hr id=answer>

{{Back}}

Styling

.card {
    font-family: arial;
    font-size: 20px;
    text-align: center;
    color: black;
    background-color: white;
}

My main goal in doing this isn’t to make the output immediately more readable to helpers. It’s more to make the card more debug-able. It’s quite hard to extract information from a screenshot for testing.

For example I had a problem where my cards were getting intervals in the 50 year range(:sob::sob:). Turns out I’d mis-configured my ignore reviews before to some random date. If I had asked for help with that there would be no way for anyone to tell what the problem was from a screenshot like this:

Something like this?


Front Template

{{Front}}

Back Template

{{FrontSide}}

<hr id=answer>

{{Back}}

Styling

.card {
    font-family: arial;
    font-size: 20px;
    text-align: center;
    color: black;
    background-color: white;
}
2 Likes

But would the data in your JSON export help identify that issue? :person_shrugging:t4: I’d say those sort of true scheduling problems/algorithm errors are less than 1% of help requests, and the dev usually needs to look at an upload of the collection to figure out a solution. Changing the format of the Card Info won’t help much if it’s not the right data.

Is that a mock-up, or a new feature that was added without mention in the last release? :thinking:

It’s a mockup.

1 Like

I programmed it in and was wanting feedback before I pr’ed it. Should just done the pr, sorry.
Edit:

We can include more data, specifically the deck config would help here. I intend for this to be an option that saves people having to send their whole deck for debugging if the history doesn’t immediately show the issue. Maybe to this end it could be hidden behind Ctrl-c rather than a button on the screen

Got it! You’ll definitely want input from @L.M.Sherlock about whether an option like this would streamline that part of the debugging process for him.

If it would only be needed when a dev asks for it – I agree that a button would probably result in it being overused by well-meaning folks seeking help. So putting it behind a key-stroke that a dev could request seems like a good idea!

No apology necessary! (Especially when you’re giving me what I want!) I was just confused – :face_in_clouds: and I’d feel silly if I’m suggesting things that have already happened.

I hardly ever get what I ask for so fast, so I hadn’t even thought about where to put it! But I now recognize that I’ve truly hijacked this thread, so I’ll add my comments on your PR instead. Thanks!

1 Like

I usually ask for sharing collection file and try to reproduce the bug with source code.

1 Like

If I made an addon that could re-construct a card and its prefab from the output of this would that help?

The more I worked on this the more I worried it might be “send your collection” with extra steps.

Any good?

I don’t like sending my collection to people (unless someone I trust) and if there’s a way to send helpful data without sending the collection, it’d be immensely helpful. Maybe it’s just my zoomer brain.

2 Likes

Scheduling can be influenced by decks, presets, review history, current card state, and some global variables - such a feature would need to ensure you got all of them, or we may not be able to reproduce all issues.

A possible alternative approach would be to have some sort of ‘anonymised export’ that does things like zero out note content, though that might be a bit awkward to use, especially if the templates are zeroed out as well.

3 Likes