Drawing an advance Debug line

Hey guys! just wondering how would one draw a debug line to fit with pathfinding.
I am using this code right now;

 Debug.DrawLine(transform.position, nav.destination, Color.red);

Which only draws a line directly from the player to the destination, how would I make the line form in a shape which follows the way the player will go

You would need to plot positions along the curve of the players movement and then iterate over the positions using Debug.DrawLine(previousPosition, nextPosition, color);

oh found a good solution thanks!
code if anyone wants it;

 for (int i = 0; i < nav.path.corners.Length - 1; i++)
        {
            Debug.DrawLine(nav.path.corners[i], nav.path.corners[i + 1], Color.red);
        }