Hello,
Welcome aboard!
Take a look at this topic:
If you are using the Processing environment you can also use:
https://processing.org/reference/println_.html
It can be very useful for examining and debugging code.
Only use it only when needed! It can slows things down.
Example:
int counter;
void setup()
{
frameRate(1); //Slows things down for this example
println("Setup: ", counter, frameCount);
}
void draw()
{
background(0);
println("Draw: ", counter, frameCount);
counter++;
}
:)