debug position generation