some real JavaScript IDE – anyone?

Debugging JavaScript can really be so much fun.. first there are Firefox’s “developer tools”. These are so slow that they bring back memories of the early Eclipse Java IDE: By the time the bloody tool shows the breakpoint you have long forgotten what you wanted to look for in the first place. From there it is then a steep downhill trip: When stepping through a function in the debugger the focus will suddenly disappear and the only way to reanimate the tool is to actually remove the previous breakpoint.. LOL it’s version 31 and Firefox still has no usable developer tools.
For all those thinking ‘ahhh but Chrome is so much better’ – think again: While it is true that Chrome’s developer tools are real quick there is a catch. Or as a colleague once said: “if the result does not have to be correct my code can be real quick!”. Here is an example of a situation that you may encounter while debugging in Chrome (this is actual – non tampered with – debugger output):

WhyJavaScriptSucks

The debugger here has just stepped over a line of code that sets some variable to 0. On the very next line the debugger tells you that this very variable is NOT 0.. Another fun Chrome surprise is when you find that Chrome’s garbage collector will actually trash ‘event handler’ functions that are still in use – unless you separately anchor them to some dedicated variable. 

I am so glad that I never make any mistakes as a matter of principle 🙂 So my latest bit of music playback programming could not be stopped by foul developer tools:

screenshot 
And what was this experiment about? xmp is a module player that plays over 90 mainstream and obscure module formats from Amiga, Atari, Acorn, Apple IIgs and PC, including Protracker (MOD), Scream Tracker 3 (S3M), Fast Tracker II (XM) and Impulse Tracker (IT) files. This functionality is now available on my little web page (click on the image above) 🙂

 

(You’ll find the source code here: http://sourceforge.net/projects/webxmp/)

Advertisements

Posted on August 20, 2014, in C, Chiptune, Compilers, Emscripten, JavaScript, MOD, Web programming, WebAudio. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: