Skip to content

On Production

This is relevant, when you want to replay code executions on a remote machine.

How does it work on Staging/Production?

The logs your application generates, are sent to Videobug server. You need to self-host Videobug server. Here is how the staging/production set up works.


Check how to self-host videobug on GCP & AWS in the following sections.

Once you get your IP after following those steps, enter it in the credentials window as shown below:

Enter IP and Creds

Sign up or Sign in and you will get a JVM argument with package name, and JWT token.

--add-opens=java.base/java.util=ALL-UNNAMED -javaagent:"/PATH/TO/videobug-java-agent.jar=i=YOUR/PACKAGE/NAME,server=,token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzaGFyZHVsQGdtYWlsLmNvbSIsImlzcyI6InZpZGVvYnVnLWNsb3VkIiwiZXhwIjoyNjMxNDU2MzgyMjA1LCJwcm9qZWN0SWQiOiJzaGFyZHVsLWRlbW8tMTY1NjA4MDUwNzQ3NSIsImlhdCI6MTY1NjM4MjIwNX0.2dS1o6Bup8H0u-VOEbdbkm8bb38-MDEitghDoM1vxRwKvbKXydpGLKpavuYnDgJGJnPNGZQLE0EK459v3eHGjw"

Deploying with Docker

If your deployment is on Docker, you need to download the java-agent jar to the Docker image and update the parameters to JVM to use the javaagent.

Here is what you can use

## Update token
ARG VIDEOBUG_TOKEN=videobug-jwt-token
## Update package name
## Update server endpoint

ARG VIDEOBUG_AGENT_PATH=/tmp/videobug-java-agent.jar
RUN wget -O $VIDEOBUG_AGENT_PATH $(wget -qO-

ENTRYPOINT ["java", "--add-opens=java.base/java.util=ALL-UNNAMED", "-javaagent:$VIDEOBUG_AGENT_PATH=i=$PACKAGE,server=$VIDEOBUG_SERVER,token=$VIDEOBUG_TOKEN", "-jar", "/application.jar"]

Replaying Remote Exceptions

Whenever your code crashes or an exception occurs in staging or production environment, you can refresh inside the Exceptions tab and see all the exceptions in your code.


Click on any row and fetch session, you will be taken in the debugging tab, you can go back or forward in time and see the variables.

Time Travel

Search Remote Code Executions

You can search code executions by the variable values. For example, if you send to your code and want to see the code execution for this email id, you can do so using Traces

The below code shows the search done for code execution where was passed as a variable value.

Logical Bugs

This is very relevant for bugs where for particular users something went wrong and no stack trace is available. For example, for, the checkout amount was $99.9 and the amount sent to bank was $100. You would want to trace the code execution line by line for such users.

Search Code