XenonFred:
From my understanding, GRBL occupies the serial monitor of the slave Arduino so there is no way to use the serial monitor.
You could open a second instance of the Arduino IDE and give yourself a second separate serial monitor or you could use a different terminal program such as PuTTY or Realterm. Any program on the PC that can send data over a serial connection can talk to an Arduino.
How do we do the coding for the slave Arduino to receive and run the code? Is it through Serial.print(gcodes) or are there any specific codes to translate the gcode to the stepper movement?
I don't understand what you have in mind. Please explain further.
...R