5
votes
Debug button missing and GNU debugger not working
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'...
3
votes
Accepted
I don't have the C GDB Debugger runner option. How do I get it?
CS50 has now released debug50 a more stable version than its predecessor. You can also manually use gdb through the command-line with; gdb OBJECT-FILE (where OBJECT-FILE is a vigenere.o, or just ...
3
votes
Accepted
How do you pass arguments into GDB argv[1] argv[2]?
To run GDB with arguments in the terminal, use the --args parameter.
gdb --args name arg1 arg2 arg3
debug50 (the graphical debugger) is just GDB with a GUI. GDB was originally designed to be run ...
3
votes
Accepted
Program and debug50 different results
Declaring the array here int matrix[candidate_count]; allocates the memory for it. But it does not initialize the contents. At the end of the for loop, there is a good chance that matrix[m] has not ...
2
votes
Do YOU know how to find a seg fault?? Advice to new programmers
Reread the post again, he explains why the seg fault happens. A quick google should suffice too.
1
vote
error use of undeclared identifer 'name' in practice set 1
First, understand that the "string" data type is a custom creation of the CS50 class. It's not a standard C data type. It's just been implemented to make things easier during the first ...
1
vote
Pset6: How to debug load() and indexes()?
Here's what I do. Use debug50 instead of the command line gdb. If you haven't used that before:
Run update50 to be sure you are up to date (the IDE is on version 81 at the moment). Then, here's ...
1
vote
Accepted
debug icon not showing on the top of cs50 ide
The old "debug" button has been removed in favor of a more stable version, the now revised debug50 requires you to run debug50 PROGRAMNAME [ARGUMENTS] in the terminal. Here's a link to the post posted ...
1
vote
Debugger hangs on "listening on port 15470"
I had the same problem. What seems to be working for me is running debug50 ./programname from the terminal.
1
vote
Debugger hangs on "listening on port 15470"
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 ...
1
vote
Debug button missing and GNU debugger not working
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 ...
1
vote
Accepted
Debugging in Problem Set 7: CS50 Finance
I forgot to answer my own question. Using dump() is better than using print statements
1
vote
Do YOU know how to find a seg fault?? Advice to new programmers
A better way to identify the source of segmentation faults is to compile with
-g -fsanitize=undefined -fsanitize=address
running the program should then point you to the exact line where the ...
1
vote
Accepted
speller- tried using printf to debug -printf not working
This will (hopefully) explain this specific problem in main and perhaps the overriding problem. The output buffer is not "flushed" until a new line (or explicit flush). The answer provided here ...
1
vote
Need help debugging
Maybe try <vector.h> and <string.h>? Note the missing .h
BTW, how is this related to CS50? I don't believe it's teaching c++
1
vote
Accepted
PSET7 : "application raised an exception (see log for details)" Theres a log?
There are no other logs. If you cannot repro in your app, this will take a little more sleuthing. The trick would be to find the condition(s) that causes check50 to give TypeError. Since this ...
1
vote
Accepted
CS50 PSET5 Trie Check- Some words register as mispelt
The problem lies in this block of code:
if (trav -> children[c - 97] == NULL)
{
trav -> children[c - 97] = calloc(1, sizeof(node));
}
else
{
...
1
vote
Accepted
Puzzled by Pset3 - find less confortable- sorting output
Whenever an unexpected value, particularly 0, suddenly appears in the sorted list and the largest value disappears, look for code that goes beyond the end of the array.
This is a somewhat common ...
1
vote
pset5 - Load - Debug Error - "Process received SIGSEGV: Segmentation fault"
DinoCoderSaurus is right, you should check any file pointer after fopen for being NULL (that's your current segfault, and use fopen (dictionary, "r");, not a hard-coded path). In theory, that's also ...
1
vote
pset5 - Load - Debug Error - "Process received SIGSEGV: Segmentation fault"
Attention to detail. What happens if "dictionary/large.text" doesn't exist? (and in a standard installation, it doesn't!). Boom, seg fault. Don't forget to test for success.
function takes dictionary ...
Only top scored, non community-wiki answers of a minimum length are eligible