Skip to main content

Questions tagged [debug50]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
39 views

help with debugging readability from Pset2

I'm looking for some help with the readability problem from problem set 2. When I run debug50, I'm getting an error message for the text (see image). It seems that the body of the text is not being ...
AmyG's user avatar
  • 41
0 votes
0 answers
19 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 ...
Alex's user avatar
  • 1
0 votes
0 answers
28 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 ...
Joseph J Filoramo's user avatar
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])) { ...
user21380365's user avatar
0 votes
1 answer
656 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 ...
Joseph J Filoramo's user avatar
0 votes
2 answers
393 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, ...
jeddah's user avatar
  • 5
2 votes
1 answer
3k 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 ...
Programming 55's user avatar
0 votes
1 answer
83 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 ...
Splendid Digital Solutions's user avatar
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 ...
Lperino's user avatar
  • 14
0 votes
1 answer
812 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 ...
littlefish123's user avatar
0 votes
1 answer
75 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 &...
Aakash Malviya's user avatar
0 votes
1 answer
39 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 ...
pawa309's user avatar
4 votes
2 answers
975 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 ...
Edwin Thomas's user avatar
1 vote
1 answer
215 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 ...
Alfonse's user avatar
  • 11
0 votes
1 answer
156 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++) ...
hatchet's user avatar
0 votes
1 answer
89 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); /...
user27771's user avatar
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 ...
Cliff B's user avatar
  • 69k
0 votes
1 answer
565 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 ...
krayevska's user avatar
0 votes
1 answer
736 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 ...
Gil Ong's user avatar
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 ...
patrickw's user avatar
0 votes
1 answer
1k 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?
Dmitriy Gordiley's user avatar
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 ...
faelesterio's user avatar
0 votes
1 answer
543 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 ...
Jianwen Yang's user avatar
0 votes
1 answer
596 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 ...
koko loko's user avatar
0 votes
1 answer
941 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 ...
koko loko's user avatar
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 ...
pj8126's user avatar
  • 3
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++)...
Edward's user avatar
  • 3
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 ...
Huang Liang Hsiung's user avatar
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!
Rahul's user avatar
  • 252
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]...
user282's user avatar
1 vote
1 answer
421 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 ...
David Ferland's user avatar
0 votes
1 answer
91 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, ...
EJ Mak's user avatar
  • 105
1 vote
1 answer
402 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 ...
devwanderer's user avatar