Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
TRENDING TODAY
Home > News > Webmaster > Google News

May 1st, 2012, 11:16 GMT · By

Debug Web Workers with Google Chrome Dev Tools

SHARE:

Adjust text size:

Web Workers in Chrome dev tools
Enlarge picture
Mozilla is not the only one improving its web developer tools. Chrome's built-in dev tools have long been the industry standard and still are, for all of Firefox's advances. They're getting better too, Google is boasting about the latest addition, support for debugging Web Workers, a relatively modern invention.

Web Workers are designed to solve the concurrency problem in browsers. JavaScript is a single-threaded language and the Web Workers API was introduced to add real threading to JavaScript by enabling web apps to run multiple scripts in the background independent from each other and by adding a message system for them to work together.

But this big advantage, multi-threading, meaning the ability to run multiple jobs in parallel, is a debugging nightmare since things can go wrong in any of the running jobs. Without appropriate tools, debugging can be tricky. Google thinks it can help.

"Chrome Developer Tools provides full debugging support for scripts running in both dedicated and shared workers," Yury Semikhatsky, software engineer at Google, wrote.

"You can now use the powerful Scripts, Timeline, Profiles and Console panels to develop Web Workers," he said.

"All dedicated workers running in the inspected page are listed in the Scripts panel, under the Workers section. Clicking on a worker URL will open a new Developer Tools window attached to the worker," he explained.

You can isolate a problem with relative ease since you can stop any worker from running, allowing you to identify the one that's causing trouble. 

The tool is useful for shared workers as well, those used by several pages at the same time. You can use the chrome://inspect page to check out all running shared workers. There you'll also find a link next to all of them which launches a Developer Tools window so you can debug them individually. 


1,753 hits
Link to this article · Print article · Send to friend

MUST-READ RELATED ARTICLES:


Mozilla Ready to Capitulate in HMTL5 Video War, Firefox May Start to Support H.264

Google Chrome 20 Is Here, Not in the Dev Channel Yet

US State Department Switches to Google Chrome, 58,000 People in Two Weeks

Google Chrome OS Gets a New Set of File Icons, Ahead of Google Drive Launch

Study Finds IE 9 the "Fastest" Windows Browser, but Opera Mini Is Faster

READER COMMENTS:



No user comments yet.
Be the first to express your opinion!
Copyright © 2001-2013 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM