debug dynamically allocated array