Two buttons: one if statement not working

I have two buttons defined as follows

const int buttonPinSwitch = 0;
const int buttonPinCycle = 3;

// Variables will change:
int ledState = HIGH;          // the current state of the output pin
int buttonStateSwitch;             // the current readingSwitch from the input pin
int buttonStateCycle;             

int lastButtonStateSwitch = LOW;   // the previous readingSwitch from the input pin
int lastButtonStateCycle = LOW;   
// the following variables are unsigned longs because the time, measured in
// milliseconds, will quickly become a bigger number than can be stored in an int.
unsigned long lastDebounceTimeSwitch = 0;  // the last time the output pin was toggled
unsigned long lastDebounceTimeCycle = 0;  
unsigned long debounceDelay = 50;    // the debounce time; increase if the output flickers

In my main loop I have the following code

  // read the state of the switch into a local variable:
  int readingSwitch = digitalRead(buttonPinSwitch);
  int readingCycle = digitalRead(buttonPinCycle);


  // check to see if you just pressed the button
  // (i.e. the input went from LOW to HIGH), and you've waited long enough
  // since the last press to ignore any noise:

  // If the switch changed, due to noise or pressing:
  if (readingSwitch != lastButtonStateSwitch) {
    // reset the debouncing timer
    lastDebounceTimeSwitch = millis();
  }

  if ((millis() - lastDebounceTimeSwitch) > debounceDelay) {
    // whatever the readingSwitch is at, it's been there for longer than the debounce
    // delay, so take it as the actual current state:

    // if the button state has changed:
    if (readingSwitch != buttonStateSwitch) {
      buttonStateSwitch = readingSwitch;

      // only toggle the LED if the new button state is HIGH
      if (buttonStateSwitch == HIGH) {
        ledState = !ledState;
      }
    }
  }

//==== Start for button 2.

  if (readingCycle != lastButtonStateCycle) {
    // reset the debouncing timer
    lastDebounceTimeCycle = millis();
  }

  if ((millis() - lastDebounceTimeCycle) > debounceDelay) {
    // whatever the readingCycle is at, it's been there for longer than the debounce
    // delay, so take it as the actual current state:

    // if the button state has changed:
    if (readingCycle != buttonStateCycle) {
      buttonStateCycle = readingCycle;

      // only toggle the LED if the new button state is HIGH
      if (buttonStateCycle == HIGH) {
        ledState = !ledState;
      }
    }
  }

//==== End

If I push the 1st button, then the ledState is toggled. However while the same thing should happen for button two, when I push it nothing happens. It is like nothing is happening when button 2 is pushed or not pushed. I have tried using pull-up and pull-down resistors but it make no difference. The button does work as when I use the second button configuration in place of that for button 1, it works.

I think that there is some obvious step in the logic that I am missing.

I think that there is some obvious step in the logic that I am missing.

You bet, and it's really simple. You need to post ALL of your code AND a schematic. 99% of the time when people have switches that do not behave the same, they have failed to use pullup or pulldown resistors. You've provided no evidence that you are on the other 1%.

Pin 0 on the Uno is shared with the serail Rx line. Which board are you using?
Which button is 1st Button?
const int buttonPinSwitch = 0;
const int buttonPinCycle = 3;

Zululander:
I think that there is some obvious step in the logic that I am missing.

hard to tell w/o seeing all of the code

you might consider writing a sub-function to detect a button press. If it works for one button, it should work for 2

int
butPress (
    byte  pin,
    byte &last )
{
    byte state = digitalRead (pin);
    if (last != state)  {
         last = state;
         return !state;
    }
    return 0;
}

your debounce logic is confusing. you reset the last timestamp whenever there is a change in button state and separately and afterward check if the current time is beyond that timestamp. But in general, if there are no real-time constraints, it's just easier to add a delay(10) in loop().

Thanks all will take a better look at this later today;

const int buttonPinSwitch = 0; //Switch 1
const int buttonPinCycle = 3; // Switch 2

Using an ESP-01

I like the idea of a sub-function.

I will feedback with more detail once I have done this.