Dev Center
Table of contents

Debug Sample

This sample is designed to:

  1. Print detailed logs in the browser console to better assist in troubleshooting.
  2. Check if your device and browser are compatible with the camera and to what extent.
  3. Collect video frames for analysis. (Require to host the sample locally)

Collect the video frames for analysis

Barcode reading is a one-time job, the application either succeeds or fails to read the barcode(s). For the failed scenario, it’s possible to make them successful by adjusting the settings provided by the Dynamsoft Barcode Reader JavaScript SDK (hereafter called “the library”). However, adjusting the settings could be a bit overwhelming. Therefore, Dynamsoft offers the debug sample that enables customers to capture and save runtime video frames for sending to the Dynamsoft team. With the original images, the team can test and optimize settings for customers.

The following shows how to host the sample and collect frames.

Download the sample

The sample can be downloaded from

Debug Sample on GitHub

Note that the entire folder is required. To download only the files in this folder, try using “”.

Set up a local server

Since the video is usually playing on mobile devices, having these frames uploaded to a self-hosted local server is most convenient, therefore, we first need to set up a local server.

We make use of the web server that comes with Express.

  • Install dependencies

Run the following script to install all dependencies.

npm install

  • Start the server

We defined the web server logic in the file “app.js”, to start it, run the following script:

node app.js

Note that we have used self-signed certificates to enable SSL on the port 4443.

Use the sample page

Once the server is up and running, open the page on the device that will do the barcode reading. The URL for the sample is “https://{your-local-ip}:4443/”. For example, suppose your ip is, the site can be visited at “”.

Note that the device should be in the same WiFi network as the server machine.

You will see a warning due to self-signing. Please ignore and keep processing.

Click the button “show scanner” and try to read barcodes, the frames will then be uploaded to the folder “debug\public\collect” as images (.png) on the server. When you have collected enough frames, please turn off the scanner, otherwise, new frames will continue to flood in.

Check the images to make sure that they correctly represent the actual usage scenario, then zip and send them to Dynamsoft for technical assistance.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(10.2.10)
    • Version 10.x
      • Version 10.0.21
      • Version 10.0.20
    • Version 9.x
      • Version 9.6.42
      • Version 9.6.40
      • Version 9.6.33
      • Version 9.6.32
      • Version 9.6.31
      • Version 9.6.30
      • Version 9.6.21
      • Version 9.6.20
      • Version 9.6.11
      • Version 9.6.10
      • Version 9.6.2
      • Version 9.6.1
      • Version 9.6.0
      • Version 9.3.1
      • Version 9.3.0
      • Version 9.2.13
      • Version 9.2.12
      • Version 9.2.11
      • Version 9.0.2
      • Version 9.0.1
      • Version 9.0.0
    • Version 8.x
      • Version 8.8.7
      • Version 8.8.5
      • Version 8.8.3
      • Version 8.8.0
      • Version 8.6.3
      • Version 8.6.0
      • Version 8.4.0
      • Version 8.2.5
      • Version 8.2.3
      • Version 8.2.1
      • Version 8.2.0
      • Version 8.1.3
      • Version 8.1.2
      • Version 8.1.0
      • Version 8.0.0
    • Version 7.x
      • Version 7.6.0
      • Version 7.5.0
    Change +