Debugging Javascript Application

Sublime Text Editor has a plugin Web Inspector for debugging JavaScript code. It helps us to set breakpoints, examine the console and evaluate sections of code. In this chapter, you will learn in detail about this plugin.

Installation of Sublime Web Inspector

The following steps show the installation of Sublime Web Inspector −

Step 1

Use the menu option Preferences → Browse Packages to get the path of installed packages as shown in the given screenshot.

Installation of Sublime Plugin Web Inspector Step1

Step 2

With the help of git command prompt, clone the packages of Debugging Javascript web application using the git repository, as shown in the command given below −

git clone -b ST3 "git://"

Installation of Sublime Plugin Step2

Step 3

To test the installation, open a command palette and start the web inspector. You can use the shortcut key for web inspector Ctrl+Shift+R on Windows and Cmd+Shift+R on OSX systems. You can see all the breakpoints needed for JavaScript application, as shown below −

Installation of Sublime Plugin Step3