Does anyone know why debug50 doesn't run when code takes command-line arguments instead of prompts the user within main? Is there a workaround for this?

Every time I want to try out part of my code using debug50, I have to alter the way input is taken, which is really annoying having to convert it and then later, after I figure out that function or part of the code, having to convert it back.

Any thoughts?

  • can you take a screenshot of what's happening? It should take cla's. You'd enter them after the program name just as if you were running the program from a command line.
    – Cliff B
    Commented Jan 10, 2023 at 23:38
  • Hi Cliff, if and when you happen to have a free moment, would you be able to take a look at the screenshots I added? I still can't figure out how to run check50 on code with command-line arguments, but if it's possible to do so, it would be a big help. Thank you! Commented Mar 1, 2023 at 22:06
  • 1
    the way to run debug50 is to type "debug50" followed by the full command as you would if you weren't running debug50. for example "debug50 ./tideman alice bob charlie". If the program is terminating with the usage message, then that's a problem with the code itself. If you want help with that, edit the question above and add the code. (Please, not screenshots, use actual cut and paste. Nobody wants to manually transcribe code for testing. ) BTW, you did remember to recompile the program after changing it, right?
    – Cliff B
    Commented Mar 1, 2023 at 22:19
  • I did recompile. I just didn't realize I needed to use that ./tideman format you mentioned here. Let me try that. Commented Mar 6, 2023 at 21:55
  • I just tried the format you suggested, and it works! So simple, I just was running debug50 tideman, expecting to be prompted for the command-line arguments, instead of actually typing in the full command all at once. Thank you!! Commented Mar 6, 2023 at 22:00

1 Answer 1


Here is a screenshot. After I make my program, then set a breakpoint at the very top of the header files, and then I enter debug50 and the program name, it skips past a chance to type in the CLA. I tried it once, and it gave me the error message for the wrong CLA format. debug50 won't take command line arguments

Here is what happens when I try to type ./tideman Alice Bob Charlie Error message

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .