In the copy.c program, when my debugger reaches line 37

FILE* outptr = fopen(outfile, "w");

I can step into it twice, but then the debugger immediatley exits with this prompt

Compiling /home/ubuntu/workspace/pset4/bmp/copy.c ...                                                                                                                                                                                                
make: `copy' is up to date.                                                                                                                                                                                                                          
Process /home/ubuntu/workspace/pset4/bmp/copy created; pid = 51384                                                                                                                                                                                   
Listening on port 15470                                                                                                                                                                                                                              
Remote debugging from host                                                                                                                                                                                                                 
Killing all inferiors                                                                                                                                                                                                                                

Process exited with code: 0

I can't even look at how each pixel is being processed.

When I run the program normally with ./copy smiley.bmp copy.bmp, it runs fine, and diff smiley.bmp copy.bmp does not return anything, so that's further confirmation.

Help much appreciated in advance.

  • 1
    DId you ever manage to figure this out? I am stumped with the same issue.
    – klmo8
    Commented Mar 1, 2016 at 0:19
  • 1
    I finished that problem and moved onto the next pset, so I haven't tested this new method yet with this particular issue, but try to do "make clean" before debugging.
    – user10805
    Commented Mar 1, 2016 at 21:08
  • 1
    I'm having the exact same problem. The debugger starts, stops at the first breakpoint and when I try to step it returns "killing all inferiors" and exits.
    – B00mstack
    Commented Apr 6, 2016 at 9:20
  • 1
    Whoa!!! same problem. Please do tell me if you have figured this out. Get the debugger to run is key to figuring out how the MSDN structs header files work.
    – kamiradi
    Commented Apr 30, 2016 at 3:44
  • 1
    Never figured it out. I just kept on chugging along without a debugger and just moved on.
    – user10805
    Commented May 3, 2016 at 13:31

1 Answer 1


If you are having problems with the graphical debugger in the CS50 IDE (as I did!) then you should learn to use GDB from the command line, as others have suggested. There are two reasons to do this: it works better, and you may not have access to the Cloud9 IDE if you find a future job as a C programmer.

Google "cs50 gdb youtube" and you should be all set in 20 minutes or so.

  • Having the same problem - just can't get the cs50 debugger to run and have watched the shorts on gdb but I can't work out how to pass command line arguements. In this case there are arguements - the bmp file to be copied and the file to be copied to. the video Commented Aug 22, 2016 at 3:04

You must log in to answer this question.

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