Can't print to monitor if more than 2 commands in Setup

I was trying to print some values coming into the Arduino UNO I was testing but the values were not printing to the IDE monitor. Commenting out much of the Setup commands allowed the print-to-monitor to work. If I uncomment one command, nothing prints. I/m using IDE 2.3.2.
In the attached code, I have one print statement in the Loop function, all else in the loop is commented out. In Setup, I have only two commands uncommented and the print function works. If I uncomment the next line (lcd.begin()), I don't get the print. Uncommenting the other commands, between the lcd commands, don't have an effect (printing works), but if I uncomment even ONE LCD command at the end of the Setup function, printing does not work.
In other words, any lcd command stops the printing. What's going on? I've used these lcd commands and function many, many times before.

const int stepPin1 = 4;  // All constants and pins below are for the Blueboy shield
const int dirPin1 = 5;   //low is one direction, high is other direction
const int stepPin2 = 2;
const int dirPin2 = 3;
const int Start1 = 9;  //jog or continuous start
const int Start2 = 8;
#define pot1 A0
#define pot2 A1
#define STEPS 200
const int STEPS_PER_REV = 200;
#define motorInterfaceType 1
const int LED1 = 11;
const int LED2 = 10;
//int pot1 = 0;
//nt pot2 = 0;
int readPot1 = 0;
int readPot2 = 0;
int speedlcd1, speedlcd2, speedDelay1, speedDelay2;
//#define Mode1
//#define Mode2            //Jog or Continuous selection

#include <Wire.h>
#include <Stepper.h>
#include <LiquidCrystal_I2C.h>  // Using version 1.2.1
LiquidCrystal_I2C lcd(0x27, 16, 4);
Stepper M1(STEPS, dirPin1, stepPin1);
Stepper M2(STEPS, dirPin2, stepPin2);

/*************************SETUP*****************************/
void setup() {
  Serial.begin(19200);
  Wire.begin();  // start I2C
                 //lcd.begin(16,4);
  //lcd.backlight();
  M1.setSpeed(1000);  //set maximum speed
  M2.setSpeed(1000);
  pinMode(stepPin1, OUTPUT);  //
  pinMode(dirPin1, OUTPUT);
  pinMode(stepPin2, OUTPUT);  //
  pinMode(dirPin2, OUTPUT);
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(Start1, INPUT_PULLUP);  //Switch common is to ground
  pinMode(Start2, INPUT_PULLUP);  //same-o
  //lcd.setCursor(0,0);
  //lcd.print("FE");
  //lcd.setCursor(0,1);
  // lcd.print("IndianHarbour");
  // delay(4000);
  // lcd.clear();
}  //end Setup function

void loop() {
  Serial.println("In the Loop function");
  //SpeedM1();
  //SpeedM2();}

  //backforth(); //tested both motors and both A4988  okay works
  /* PB and LED test.  Press button, light LED.  Switch common to ground.  okay works
if (digitalRead(Start1)==LOW){
  digitalWrite(LED1, HIGH);
  delay(250);
  digitalWrite(LED1, LOW);
  delay(250);}\
  */
}  //end Loop function

/***********************M1 and M2 Forware/Reverse******************************************/
void backforth() {              // This is for M1
  digitalWrite(dirPin1, HIGH);  //
  Serial.println("forward");
  for (int x = 0; x < 1600; x++) {
    digitalWrite(stepPin1, HIGH);
    delayMicroseconds(500);
    digitalWrite(stepPin1, LOW);
    delayMicroseconds(500);
  }  //end for loop
  delay(1000);

  digitalWrite(dirPin1, LOW);
  Serial.println("Reverse");
  for (int x = 0; x < 1600; x++) {
    digitalWrite(stepPin1, HIGH);
    delayMicroseconds(500);
    digitalWrite(stepPin1, LOW);
    delayMicroseconds(500);
  }  //end for loop
  Serial.println("end of second loop, 400 steps");
  delay(1000);
}  //end backforth function

/***********************M1 and M2 Speed******************************************/
void SpeedM1() {
  Serial.println("in SpeedM1 function");
  readPot1 = analogRead(pot1);
  speedDelay1 = map(analogRead(readPot1), 0, 0, 1023, 1000);
  Serial.print(speedDelay1);
  Serial.println(readPot1);
  speedlcd1 = map(analogRead(readPot1), 0, 0, 1023, 1000);
  //lcd.setCursor(0,0);
  //lcd.print("Speed M1 =    ");
  // lcd.print(speedDelay1);
  digitalWrite(stepPin1, HIGH);
  delayMicroseconds(speedDelay1);
  digitalWrite(stepPin1, LOW);
  delayMicroseconds(speedDelay1);
}

void SpeedM2() {
  Serial.println("in SpeedM2 function");
  readPot2 = analogRead(pot2);
  speedDelay2 = map(analogRead(readPot2), 0, 0, 1023, 1000);
  speedlcd2 == map(analogRead(readPot2), 0, 1023, 0, 100);
  // lcd.setCursor(0,1);
  // lcd.print ("Speed M2 =    ");
  //lcd.print(speedDelay2);
  digitalWrite(stepPin2, HIGH);
  delayMicroseconds(speedDelay2);
  digitalWrite(stepPin2, LOW);
  delayMicroseconds(speedDelay2);
}

I tried your code on an Uno R3 and did not see your problem. Other than an '==' where you meant a '=' in SpeedM2, no issues with the compile. And with all the lcd commands uncommented in setup(), the program printed "In the Loop function" endlessly in the serial monitor, as expected.

Check that your Serial Monitor has the same baud.

Mine still refuses to work under conditions specified. I changed baud rate from 9600 to 115200, no change. I changed UNO, and USB cables, no change. I added one more command to see if it was related to the number of commands in Setup. The print worked. But if uncommented, as before, one of the LCD commands, I could not print. Oh, I changed the symbol (sorry if I'm not using proper terminology, please correct me) from LCD to lxd, thinking maybe it was reserved word. it STILL did not work. I'll try and work with a fresh new sketch...maybe mine has a control character in there or something. No errors reported.

  readPot1 = analogRead(pot1);
  speedDelay1 = map(analogRead(readPot1)

bad names leading to confusion

what?

Maybe so, but all that code is commented out and not running. Not part of the problem. I just started putting pieces of the code together and need print statements to see what is going on. So if the printing issue gets resolved, then I can look at your suggestion. Thanks.

const int stepPin1 = 4;  // All constants and pins below are for the Blueboy shield
const int dirPin1 = 5;   //low is one direction, high is other direction
const int stepPin2 = 2;
const int dirPin2 = 3;
const int Start1 = 9;  //jog or continuous start
const int Start2 = 8;
#define pot1 A0
#define pot2 A1
#define STEPS 200
const int STEPS_PER_REV = 200;
#define motorInterfaceType 1
const int LED1 = 11;
const int LED2 = 10;
//int pot1 = 0;
//nt pot2 = 0;
int readPot1 = 0;
int readPot2 = 0;
int speedlcd1, speedlcd2, speedDelay1, speedDelay2;
//#define Mode1
//#define Mode2            //Jog or Continuous selection

#include <Wire.h>
#include <Stepper.h>
#include <LiquidCrystal_I2C.h>  // Using version 1.2.1
LiquidCrystal_I2C lcd(0x27, 16, 4);
Stepper M1(STEPS, dirPin1, stepPin1);
Stepper M2(STEPS, dirPin2, stepPin2);

void setup() {
  Wire.begin();  // start I2C
  lcd.init();
  lcd.backlight();
  M1.setSpeed(1000);  //set maximum speed
  M2.setSpeed(1000);
  pinMode(stepPin1, OUTPUT);  //
  pinMode(dirPin1, OUTPUT);
  pinMode(stepPin2, OUTPUT);  //
  pinMode(dirPin2, OUTPUT);
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(Start1, INPUT_PULLUP);  //Switch common is to ground
  pinMode(Start2, INPUT_PULLUP);  //same-o
  Serial.begin(115200);
}  //end Setup function

void loop() {
  Serial.println("In the Loop function");
  delay(100);
 } 

I deleted the most comments.
works, no errors, no problems.

Make sure the same baud rate is set in the serial monitor

If the program execution always hangs on the display initialization line - maybe this is not a software problem, but a hardware one - with the LCD or its connection?

Please show your full schematic

Hi.
I think the library you're using uses .init() instead of .begin(). Also, it takes no arguments.
If that didn't work, you can try and change 0x27 to whatever address the LCD screen actually is (You can check by using the I2C scanner example at File>Examples>Wire>i2c_scanner).

Okay it is working. What did I do? I don't know.
All I changed was the section using the map function (suggested by Kolaha). I've been trying to get the steppers going and when they were not working I wanted print statements to help me troubleshoot. That's when I involved this forum because printing did not work. So I GAVE UP on it temporarily to concentrate on the actual problem at hand, getting the steppers to work. That is all I did! I didn't touch anything connected with the LCD or print statements. After making the changes, on principle, I tried an LCD command and the print to monitor kept working. Eventually all the commands were uncommented and still working.
No change to baud rate
No change to lcd.init (from lcd.begin). The library shows init and begin as useable.
LCD address was correct. I thought maybe my change from a 20 character (the default) to 16 character (what I had installed) was a possibility, but no, it wasn't.
So, it works. Thanks to everyone for their input. Sometimes it's the smallest and silliest of things that will get you, so any input is good.
Like I said, I did nothing except clean up the function to change the motor speed.