You have a logic error in your declaration of ciphertext. Take a look at how it is declared (it's type) and the type of plaintext. ;)
This should hopefully make it clear why one seems to work with multiple letters and the other only one.
If this helps, feel free to click the check mark. But if not, let me know and I will help further.
The problem lies here:
if (key_length != 26 || isalpha(argv))
The isalpha() function and all of it's cousin issomething() functions take a single char as input. If you try to give it a string (argv(1) is a string, not a char, even if it only has one char), it causes a seg fault. It's that simple.
As for debug50, it is a wrapper around gdb. Think of it ...
The documentation for isalpha explains that the input should be an unsigned char. https://manual.cs50.io/3/isalpha
By passing in a string instead of a single char, the underlying library code is misbehaving. Too bad it's not a compile error.
Why debug50 behaves differently, there's probably different library code being executed. Many advanced things happen &...
Program doesn't know if all the characters in key are digits until after it has processed all of them. The "Success" message should come after the for loop is finished. And remember this hint from the spec:
Recall that we can return nonzero values from main to indicate that our program did not finish successfully.
As soon as a non-digit is found, ...