Skip to content

Try DLint on a Virtual Machine

Liang Gong edited this page Feb 13, 2017 · 6 revisions

This manual is a step-by-step guide for trying DLint on a virtual machine. Due to some issues from Selenium, using DLint on a Mac OS 10+ is strongly recommended.

Step 1. Get the Software and the Image

Step 2. Create the VM

  • Open the VirtualBox software and click the "New" button to create a new virtual machine.

Note: choose Linux and Ubuntu (64bit). Make sure that your OS supports 64-bit hardware visualization.

  • Configure the memory of your virtual machine (512M is recommended).

  • Chose the virtual hard drive (select the last one).

  • Click the small icon on the right to choose the vdi file decompressed from the VM image downloaded.

  • Click the "create" button and you should be able to see the following UI.
  • Select the VM in the left list panel and click the "Start" button to run the Guest OS with DLint installed.

Step 3. Use DLint in the VM

  • In the guest OS, double click the Start-DLint-Terminal.sh script file on the desktop and click the "Run in Terminal" button in the popped up window.

  • In the opened terminal, use command ./scripts/dlint.sh [url] to run DLint on a website. For example, here we try ./scripts/dlint.sh jackietrananh.com

DLint will automatically open a Firefox browser and interact with it. Since DLint instruments the web page, the process may be a little bit slower than a usual web browsing experience. Please do not interact with the DLint-opened browser. DLint will automatically interact with the web page.

After a while, DLint has collected and analysed the runtime information. The browser will be closed automatically.

  • Go to directory: ~/dlint/DLint/websites/. There will be a folder named by the website's URL, inside which src directory contains the JavaScript code and instrumented JavaScript code from the webpage. analysisResults.json contains all the warnings generated by DLint.