If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly
Mesh positions are local, so the Transform on the mesh renderer is applied.
If you use those positions in Debug.DrawRay you need to similarly transform those dots, because DrawRay is world coordinates.