4

I'm using Chrome. I have never seen the Debug button but only the Run button on the top line in my online IDE. How to make the Debug button out?

Every time I press the Run button, the bottom terminal always displays the same words no matter what I click or type in or how many break points I set, and neither the buttons on the right panel work. What should I do?

I've read the suggested post. The issue is not solved in that post, either.

Thank you!

GNU debug not working

5

I had the same problem. The only way I've been able to use the graphical interface is to run debug50 ./programname from the terminal.

An alternative would be to use gdb from the terminal which there's a CS50 section on: https://www.youtube.com/watch?v=y5JmQItfFck

| improve this answer | |
1

Google "cs50 gdb youtube" and you will find two helpful videos explaining how to use the debugger from the command line. It's much more reliable, and has the added benefit of being a tool that will always be available to you in the future even if you do not use the Cloud9 IDE for development.

Basically, to debug myprog with a breakpoint at myfunc, passing arguments arg1 and arg2, do the following:

gdb ./myprog
break myfunc
run arg1 arg2

To debug functions in multiple files, set your breakpoints and then as you are stepping through statements with n, pay attention and when you get to the line that calls the externally-defined function, step into it with s instead.

| improve this answer | |
  • Thanks! The command mode works. But the GNU debugger is still not working. I've updated the question. Thank you! – Kevin King Aug 25 '16 at 16:14
0

If you click on Run, you should see on the top right corner of the bottom window that opens a button with a bug on it.

If you click on it, it should become green and then when you run again, with the Run button on the left of that same part of the window, everything should work fine.

You may have problems with the fact that there are multiple files, but I can't help you with that.

| improve this answer | |
  • 1
    Your suggestion does not work. The terminal does not have any response no matter what I click or type in. – Kevin King Aug 25 '16 at 16:15
  • @KevinKing This question became a duplicate of this. – Abehssera Yohan Aug 25 '16 at 18:35
  • But suggestions in that post do not solve the issue. And the debug button issue is not found in that post. @AbehsseraYohan – Kevin King Aug 26 '16 at 1:59

You must log in to answer this question.

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