Report issue

Implementation of “report issue” functionality for end users/testers

Estimated reading time: 2 mins

Last edited: 13 Dec 2019

In this chapter you will learn how to use RevDeBug API to create a “Report Issue” button. In most applications such button would simply open up a form, to be filled up with details about the issue. It’s mundane for the user, and he won’t probably do this. And if so, there is a possibility, that user doesn’t really know what happend, and the description isn’t really accurate and it’s not very helpful in solving the issue.

RevDeBug API has a functionality, that allows you to trigger the Snapshot Recording (a short recording of code execution). The objective of this chapter is to use RevDeBug API to create a “Report Issue” button, that will send you a Snapshot Recording of what happened to your user just before he decided to submit a report.

Enable Snapshot Recording

First you need to add RevDeBug to your application in OnEvent ConnectivityType. To do this, follow this chapter about API installation.



    compileJava {
        options.compilerArgs = [

Also take notice of the BacklogSize value. On default it is set to 1000 which means, that in case of a crash, RevDeBug will record 1000 events before it. This data retention value is fully customizable and it purely depends on your needs.

Report Issue button implementation

Finally, we can implement the “Report Issue” button functionality. For example, let’s fire the Snapshot creating method on buttonClick:

buttonClick.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {
    RevDeBug.Storage.getStorageApi().StoreSnapshot("Snapshot Name");

And that’s it! As you can see in the code above, you can fully modify the Snapshot name. It would be perfect, if this name was relevant to its content - whether it is current date, username or description of the issue. In the next part you will learn how to customize the Snapshot name.

Custom Snapshot name

To easier identify the snapshot, it is crucial for it to have a more descriptive name than “Snapshot Name”. For example, we could ask the user to enter the custom name with some identification data.

private String askUserForRecordingName(){
    return JOptionPane.showInputDialog("Enter the name of the recording");

buttonClick.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {
    String recordingName = askUserForRecordingName();