Javascript iTunes: debugging

One other thing that is very important to me is debugging.

Now I am very much not impressed by the default Windows Javascript debugger, so I use a lot of logging of operations. This is rarely mentioned by others, so I bring it up here.
Having popups with WScript.echo() drives me crazy (I won’t click “OK” 1000 times while running a script to find tracks without artwork in my library) and having the default debugger pop up means that there is a problem with my Javascript.

So I do a lot of logging of operations, stuff like this:

var logFile = fso.CreateTextFile("CopyAlbumArtwork.log", true);

Then I can write progress information to this log file and review what works and what doesn’t; eventually taking manual actions to resolve problems (like a weird song with the album name in Japanese characters).

Tagged with: ,
Posted in Scripts

Leave a comment