🤯 50% Off! 700+ courses, assessments, and books

Remotely Debug and Test JavaScript with New Vorlon.js Plug-ins

Etienne Margraff

This article is part of a web development series from Microsoft. Thank you for supporting the partners who make SitePoint possible.

In April 2015, our team of engineers and tech evangelists at Microsoft launched Vorlon.js, an open source, extensible, platform-agnostic tool for remotely debugging and testing your JavaScript.

When we launched the project during the Microsoft Build Developer Conference keynote, we had only three plugins: the DOM Explorer, the Interactive Console and Modernizr. We knew at this time that the key to the success for a project such as Vorlon is the quantity and quality of plugins. When you want to debug your website, you do not want to do much complicated things. You just want to pick the correct plugin and get the correct information.

This is why we made this project open source. We know you have a lot of ideas to provide great debug experiences to web developers.

So two months, 66 pull requests, 78 issues and 547 commits later: we are proud to announce that we (YOU and the team) just released Vorlon.js version 0.0.15! You can get it by either cloning our GitHub repository or installing it using npm command tool (npm install –g vorlon).

Note: if you are still wondering what Vorlon.js is, please read this article from David Catuhe first:_ http://blogs.msdn.com/b/eternalcoding/archive/2015/04/30/why-we-made-vorlon-js-and-how-to-use-it-to-debug-your-javascript-remotely.aspx).

Let’s have a look at what is new in this version.

New Plugins

XHR Panel is here to help you get the list of requests done through XMLHttpRequest. You can choose to enable or disable the recording using the play button.

XHR panel XHR panel

Network Monitor is bringing the ability for you in Vorlon to see all the network exchanges that are done between the browser and the web server. It provides the resource name, the server domain, the type of request, the duration in milliseconds and a nice visual timeline!

Network Monitor

Resource Explorer gives you information about what is stored locally on the client browser instance. There is data about Sessions , Cookies , and Local Storage. This can be really useful when you want to debug local cache or login / persistent user data issues.

Resource Explorer

NG Inspector is a $scope debugger for AngularJS. You have an easy access to all the values stored in each scope. This first version gives you information, a future one will give you the ability to edit your scopes.

NG Inspector

Plugin Improvements

DOM Explorer has been improved a LOT.

Previously, this plugin was sending all the DOM data from the client to the dashboard each time it changed. This had a huge impact on performances. This is now fixed and you can refresh the DOM from the client either by asking it manually hitting the refresh button, or activating the auto-refresh on the Settings pane. The autofresh is smarter and uses MutationObserver if available on the client browser.

DOM Explorer

Bonus feature: when the DOM changes on the client side, the round indicator in the refresh button changes to red!

Refresh indicator

As you can see, the DOM Exploring pane is more beautiful and easier to read.

You can now edit HTML content and attributes by clicking on it. When hitting ENTER, the changes will be applied on the client side.

Editable HTML content 1

Editable HTML content 2

The DOM highlighting feature is easier to access. It happens when your mouse goes over the DOM element on the DOM explorer in the Vorlon dashboard.

DOM Highlighting

You can also right click on an element to remove or edit things. This is the best ergonomic way to enable deletion on attributes.

Editing elements with a right click

In the right pane, you have more information that just only the real CSS code now.

The layout tab gives you information that you are used to get in classic F12 tools: the margin, padding, border and size information.

Layout tab

Same thing for the computed styles which contains all the CSS styles applied explicitly and implicitly inherited.

Computed styles

The HTML tab is a better tool to edit text in the DOM. You can do breaklines and apply the change by hitting the save button.

HTML tab

Finally, the settings section is where is you can activate the auto refresh for the DOM.

Interactive Console have some new features too.

Interactive console

We have the windows.onerror, console.dir and complex object log support. You can navigate in object properties using a visual tree. Filters are available to only show a subset of logs and you can filter using a search-like text area.

Other Changes and Improvements

We did a lot of other changes in the code organization and structures that are not directly visible in plugins and features.

For instance, we renamed and moved the catalog.json file which contains the list of plugins and some parameters to the Server folder. It is now called config.json because some parameters are not related to plugins. To avoid copy paste and to simplify debug and usage, we also added an enabled boolean parameter in the plugins configuration in config.json. If false for a specific plugin it will not be loaded in the dashboard and not sent to the client in the generated vorlon.js file.

We also split the plugins in two separated files. Originally a plugin was composed of only one JavaScript file containing the code for the dashboard and the client side. It was easier when we started the project. Now more complex plugins are created and for optimization reasons we split this into two different files: yourplugin.client.js and yourplugin.dashboard.js.

You can read more about the changes we made in the whatsnew.md file available on our GitHub repo.

What’s Next?

We are now working on the next version which will contain new plugins and core improvements. Authentication, webgl, webaudio are part of the list!

As I said, we want this project to be the web developer’s project. If you have an idea, you can either:

  • Submit an issue on GitHub
  • Create it yourself and submit a pull request (we review this every day!)

_Note: to help you learn how to create plugins, I have written this intro.

Let’s work together on Vorlon.js to make debug experiences easier and better.

Do not forget to follow our team twitter account!

More hands-on with JavaScript

This article is part of the web development series from Microsoft tech evangelists on practical JavaScript learning, open source projects, and interoperability best practices including Microsoft Edge browser and the new EdgeHTML rendering engine.

We encourage you to test across browsers and devices including Microsoft Edge – the default browser for Windows 10 – with free tools on dev.modern.IE:

In-depth tech learning on Microsoft Edge and the Web Platform from our engineers and evangelists:

More free cross-platform tools & resources for the Web Platform: