What is the best way to draw a grid or debug lines?

I’d like to debug my opengl application in a more visual way, what would you all recommend is the best route for drawing a grid like:

or lines that help visualize the normal’s of a cube’s face, or even draw the frustum of my camera. I’m not sure if I should draw the lines from my application code like any other mesh I make, or just create the lines in the shader.

For example, those axis arrows I’m imagining are made of a mesh that is individually transformed and reused from my application, and then colored blue, green and red in the shader. The grid I’m thinking is another mesh?

I’m not looking for code just advise that might point me towards the direction. Hope this makes sense.