Chrome, JavaScript, webdev

Debug NodeJS Like A Pro

NodeJS Debugging with Chrome

NodeJS Debugging with Chrome

Anyone who is building an application find out that, what is starting as ‘small project’, becoming very quickly bigger and bigger monster. You can use console.log on small projects but as they are growing you will need better tools. In the arena of “JavaScript on the server” there weren’t many tools to debug your code effectively. However, with the power of open-source projects like: Node, Blink and others there are few powerful ways to debug you code like a pro.

First, for the one that are a bit confuse about NodeJS. Well, it’s not a “JavaScript web server” but an environment to run JavaScript on the server. It is using V8 engine so the performances are very compelling. After using NodeJS inside Compute engine I got few questions about the debugging options. In the past, developers needed to use console.log and similar ‘printing’ commands in order to understand what is going under the hood of their script. But as we mention, when you get out of the area of 100 lines script and your application contain different modules and many more lines of code. You need a debugger (and hopefully other tools like profiler) in your hands. Luckily, we can use Chrome (=Blink) dev tools for your NodeJS applications.
Here are the main steps and the ways to leverage your new ‘hammer’. Continue reading

Standard
Chrome, HTML5, JavaScript

WebRTC Updates

webrtc logoIn this week show on Google Developers live Israel we hosted Sam Dutton in order to hear what’s new in the land of WebRTC. What? Well, Web Real-Time Communication (WebRTC) is a collection of standards, protocols, and JavaScript APIs that enables peer-to-peer audio, video, and data sharing between browsers. We covered (with demos) the three primary APIs:

  • MediaStream: acquisition of audio and video streams
  • RTCPeerConnection: communication of audio and video data
  • RTCDataChannel: communication of arbitrary application data

It was a fun 20min talk with some very impressive demos. Here are few demos that show the power of getUserMedia API: Continue reading

Standard