Added String[index] checking in debug config to cpp/js/as.