Questions tagged [debug50]
The debug50 tag has no usage guidance.
35
questions
0
votes
0
answers
9
views
Pset 04 Edges FIlter. I don't know whats wrong with the code
I've been trying to implement the function edges with an auxiliary one, determineEdges. It compiles, but generates, probably by an error, a black image.
I'm having trouble to figure out what is the ...
0
votes
0
answers
17
views
How to use .txt file with debug50 - pset3 tideman
Does anyone know if there is a way to store a bunch of data, e.g. number of voters and votes for the Tideman problem, as a .txt file, and then run that with debug50, so that I don't have to manually ...
0
votes
0
answers
256
views
I was solving the problem set 2 bulbs. I dont seem to understand why the values of both string variables "text" and "s" are changing when I run debug
lines from my code are:
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
const int BITS_IN_BYTE = 8;
void print_bulb(int bit);
int main(void)
{
...
1
vote
1
answer
14
views
Nested for loop not returning to parent in substitution.c
I have a nested for loop of
for(int i = 0; i < strlen(key); i++)
{
for(int j = i + 1; j < strlen(key); i++)
{
if(toupper(key[i]) == toupper(key[j]))
{
...
0
votes
0
answers
34
views
Speller: Valgrind tests fail; problem may be with load
My spell checker seems to run pretty well, except the unload function never ran properly. It compiles, but executing it prints out the misspellings but then prints the message, "double free ...
0
votes
1
answer
402
views
debug50 won't run with command line arguments
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 ...
0
votes
2
answers
278
views
speller seg fault
I have been on this for literal days, there is always a seg fault no matter what i do
things i have tried:
debug 50: MULTIPLE TIMES, i fix the errors i find but end up with another one soon after, ...
0
votes
0
answers
1k
views
Can't Run Debug50 on VsCode!
Referencing the issue below: Can't run debugger
2
votes
1
answer
2k
views
Can't run debugger
I'm trying to run the debugger, by typing into the terminal:
debug50 ./filename
But unfortunately an error comes up in the terminal, saying:
Failed to connect extension server on port None.
Please ...
0
votes
1
answer
79
views
Which code/command should I use in the IDE terminal to get suggestions of where I have made an error
Which code/command should I use in the terminal to get suggestions of where I have made an error in case the program is not successful in running. For instance, after running a code, I know there are ...
0
votes
1
answer
57
views
Debug50 won't even open and I don't know what step to take next in lab4 Recover
Because I can't get debug50 to help me out, I don't know where to start to debug this program. I think I have an infinite loop somewhere, but I'm not sure. Any help to get me started on right path ...
0
votes
1
answer
697
views
How can I use debug50 when it says "Command not found" every time I try to run it?
I am using cs50 sandbox and have tried to use debug50 over the past few weeks with no luck; I keep googling, watching CS50 videos, not just Professor Malan's lectures, but also Professor Doug Lloyd's ...
0
votes
1
answer
73
views
Getting different outputs when I use debug50 and when I run the program
When I use debug50 on this program I get 26 as the value of 'a' but when I run it I get random large values of 'a'.
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include &...
0
votes
1
answer
38
views
Pset2 Substitution My code working when I use debugger and does not working thorough console or test. What am I doing wrong?
Sorry for my English( I am learning.
1.I have make this code, but when I have wrote "isduplicate" function it makes uncatchable bug. Code work as my expectetion only in debugger. So where is ...
4
votes
2
answers
822
views
Debug50 is not functioning properly
I was using debug50 over and over for pset5 speller and at some point it just stopped working. Now when I try to use it with simple programs it still won't work. I've restarted the ide from inside ...
1
vote
1
answer
190
views
How to skip loop iterations with debug50?
I'm struggling with the recover problem.
I'm running a while loop that's more than 7 thousand iterations long. I get a segmentation fault because (i'm pretty sure) of the last or perhaps the last but ...
0
votes
1
answer
151
views
Program and debug50 different results
I'm trying to do pset3/tideman.
My question is, why when I run program, I get different result (matrix[m]) than run with debug50?
void lock_pairs(void)
{
for (int i = 0; i < pair_count; i++)
...
0
votes
1
answer
86
views
HELP ME!! CS50 pset1 credit.c says INVALID but when I debug it says AMEX?
#include <stdio.h>
#include <cs50.h>
int main(void)
{
long long cc;
//get user input for cc
do
{
cc = get_long_long("Number: ");
} while (cc <= 0);
/...
8
votes
2
answers
2k
views
Do YOU know how to find a seg fault?? Advice to new programmers [closed]
I have noticed a rash of questions lately that are essentially this: "My code has a segmentation fault. The code compiles, many tests pass, but I can't figure out the problem!"
If this is ...
0
votes
1
answer
556
views
To those who struggle with pset4’s filter-more’s edge detection filter
I’m sure it is obvious for some people, but it wasn’t for me)
If your code isn’t working the way it should, you can create new .c file and put there your logic from edge detection function.
You can ...
0
votes
1
answer
696
views
Debug50 Running through breakpoints
I am trying to use debug50 for PSET 4 (Recover). However, when I set the breakpoints the debugger runs through them and do not pause. Only when I set the breakpoint at the if statement shown in the ...
0
votes
1
answer
51
views
PSET3 Resize (Less) - works in debug50 but segmentation error when executing
I'm working on resize (less comfortable) in pset3 and it returns segmentation error when I execute the code. However, when I try to work out which line actually went wrong using debug50 and go through ...
0
votes
1
answer
991
views
How to exit debug50 window?
Can anyone tell me, how to close degub50 window and terminate a programm so I don't have to run my code to the end if I've already found a bug?
0
votes
1
answer
30
views
vigenere file produces two different different outputs throug debug50 and ./vigenere
This is for pset2 vigenere; Through check50, my code works, except for one case: "a does not produce a under key 'a'". If you copy my code, compile it, and run it, it works fine sometimes and other ...
0
votes
1
answer
528
views
Can not use debug50
The error message: Can't debug this program! Are you sure you compiled it with -ggdb?
I am using CS50 to debug my C++ program, but after typing "debug50 ./(program name)", it showed the above error ...
0
votes
1
answer
544
views
How to keep track of cursor in fread/fwrite etc
after two or more weeks I have finished recover problem set - the longest issue was with the cursor and debugging.
I less than more know how to use debug50 but if somebody could tell me how can I ...
0
votes
1
answer
927
views
debug50 does not open my code
I want to debug my program with debug50 but when I run debug50 recover card.raw it does not stop at the breakpoints or show any variables or anything - see only the line number of breakpoint but ...
0
votes
1
answer
51
views
pset4 resize: no problem with debug50 but file becomes corrupt
Here is my code. Debug50 runs without any wrong value but when i open the file AFTER using debug50, it shows to be of 0 bytes and doesn't open. on compiling with ./resize, some of the bytes get ...
0
votes
1
answer
52
views
"Game of Fifteen" debug50 works but not actual execution
My init function works in step by step debug mode but it does not when I actually execute the file, why is this?
void init(void)
{
for (int k = 0; k < d; k++)
{
for (int l = 0; l < d; l++)...
0
votes
2
answers
44
views
./generate 1000 | ./find 42 failed, get_int() got nothing but program still worked
If I use ./generate 10, I can successfully printf a random list, and if I use ./find 42, there successfully comes prompts to a ask me input numbers.
However, if I use ./generate 10 | ./find 42, the ...
0
votes
0
answers
48
views
in my cs50ide account
debug50 is not working in my IDE. What should I do? Any suggestion. Please fast!
0
votes
0
answers
143
views
FATAL: varcache miss for varobj var50.0 while using debug50
I am trying to debug a code but whenever I try to run gdb I'm getting
FATAL: varcache miss for varobj var50.0
#import <stdio.h>
int main(){
int n;
scanf("%d",&n);
int arr[1000]...
1
vote
1
answer
416
views
CS50 IDE Debugger stops after having executed the code line at breakpoint
The debugger itself seems to work fine, but my problem is :
When I set a breakpoint in the gutter and then I properly run the debugger, the code stop at my breakpoint, but it doesn't stop before ...
0
votes
1
answer
90
views
Does IDE50 offer an an "Immediate" window or the ability to use breakpoints/watches?
I'm trying to debug some C code, and the Dubugging feature built into IDE50/Cloud9 doesn't seem to work with C.
Is there a way for me to perform common debugging tasks in IDE50 like add breakpoints, ...
1
vote
1
answer
387
views
How to initiate debug50 when a variable reaches a certain value?
I am working on recover.c and I need to debug my code by watching the variable states.
However, stepping through the program 400 times in a loop is not very easy, how can I set up the debugger so that ...