1

I've looked through this site and google, and can't figure out why this is happening.

I'm trying to debug problem set 5, but the debugger in the cs50 IDE isn't responding.

I'm seeing the "Remote debugging from host 127.0.0.1", and then it just hangs there. If I kill the gdb process, it gives me the expected response of running the program, and ending early bc I haven't added a name for the text file to check.

speller.c and dictionary.c are compiling ok. Even setting a breakpoint at the beginning of main, I get the same "Remote debugging from host 127.0.0.1" hanging issue.

Is this a known issue with the debugger? Is there a way to bring it back to normal state? Since I'm killing the gdb server, I'm imagining the problem is with a missed connection or something else.

Thanks for your help.

Mike

1
  • Occasionally, it will hang on, "Listening on port 15470". Commented Nov 29, 2015 at 20:45

2 Answers 2

1

I found this happens if you launch the debugger from dictionary.c instead of speller.c. I also found a couple of remedies.

First: set your breakpoints in dictionary.c then launch Debug from speller.c

Second: If you do launch from dictionary.c, there is a Command: field in the debugger tab. Change it from pset5/dictionary.c to pset5/speller.c [arg-1] arg-2 and click Run. This may or may not get past either hang spot. If not, click the Restart swirl (right of the run/stop control). It may take 3 or 4 restarts, or more, before the computer finally does what you want it to. (I've had to restart as many as 10 times, your mileage may vary).

The upshot is, you have to debug speller.c not dictionary.c.

3
  • Thanks, yes, I've noticed that it starts hanging when I do accidentally start in dictionary. But, after I stop and start, it doesn't necessarily come back. I'll just have to keep trying to restart and go from there. Commented Dec 2, 2015 at 2:47
  • I have a breakpoint in speller as well as in dictionary.c. They all compile and run okay, but when I try to get to the breakpoint in dictionary after the speller one, it just hangs. Any ideas on this one?
    – user10805
    Commented Feb 25, 2016 at 5:22
  • @user10805 I have one suggestion, it has worked for me in the past. Do a make clean and let the debugger do the compile. I have a theory about it, but so far no proof. If that works, great. If not, you'll need to give a more detailed description of the problem and post a new question. Good luck! Commented Feb 25, 2016 at 18:47
0

Removing all expressions under "Watch Expressions" and restarting the debugger solved the problem for me.

You must log in to answer this question.

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