JavaScript debugging function that logs app's memory usage (heap size).