On linux, there is gdb, there are also some online variants if you are into that, also valgrind for memory related issues on windows, Visual studio has integrated debugger. Also Dr.Memory for memory related issues, I believe there are versions for win, linux & mac. Answer from DDDDarky on reddit.com
๐ŸŒ
OnlineGDB
onlinegdb.com โ€บ online_c_debugger
Online C Debugger - online editor
/****************************************************************************** Online C Debugger. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Debug" button to debug program.
๐ŸŒ
OnlineGDB
onlinegdb.com
GDB online Debugger | Compiler - Code, Compile, Run, Debug online C, C++
Online GDB is online compiler and debugger for C/C++. You can compile, run and debug code with gdb online. Using gcc/g++ as compiler and gdb as debugger. Currently C and C++ languages are supported.
๐ŸŒ
Python Tutor
pythontutor.com โ€บ c.html
Online C Compiler, Visual Debugger, and AI Tutor - Learn C programming by visualizing code
Online C compiler, visual debugger, and AI tutor - the only tool that lets you visually debug your C code step-by-step (also debug Python, JavaScript, Java, and C++ code)
๐ŸŒ
BibSonomy
bibsonomy.org โ€บ url โ€บ 8d06f8668c3dfd984211b57b46ba60f1
GDB online Debugger - Code, Compile, Run, Debug online C, C++ | BibSonomy
cpp ยท debugger ยท gdb ยท ide ยท online ยท webapp ยท @cnp 9 years ago ยท (last updated 9 years ago) References ยท Bookmarks ยท deleting review ยท Please log in to take part in the discussion (add own reviews or comments).
๐ŸŒ
Reddit
reddit.com โ€บ r/c_programming โ€บ any good and easy-to-use c debuggers?
r/C_Programming on Reddit: Any good and easy-to-use C debuggers?
January 12, 2023 -

I could really use a c debugger that is easy to use and set up. I am just a beginner, so I doubt I'd be able to configure a debugger myself as the other posts recommend. I just need to paste my code and follow its logic and see how the variables change.

I am doing cs50 and its built-in debugger only works half of the time. It is laggy and doesn't even show the contents of arrays.

๐ŸŒ
W3Schools
w3schools.com โ€บ c โ€บ c_debugging.php
C Debugging
Add checks (like if (y != 0)) to avoid crashes before they happen. Use an IDE's debugger when you're ready for deeper debugging.
๐ŸŒ
ScholarHat
scholarhat.com โ€บ compiler โ€บ c
C Online Compiler & Code Editor | Run C Programs Instantly
Use our free C online compiler to write, run, and debug C code instantly. No downloads, works in browser, mobile-friendly, with GCC support. Try it now!
๐ŸŒ
Landing.Jobs
landing.jobs โ€บ home โ€บ an intermediate guide to debugging c code with online gdb c compilers
An intermediate guide to debugging C code with online GDB C compilers - Landing.Jobs
February 16, 2023 - Thread debugging commands include ... to set a breakpoint only for a specific thread. One major advantage of using an online GDB compiler is that it allows developers to debug their code in a web browser without needing to ...
Find elsewhere
๐ŸŒ
Programiz
programiz.com โ€บ c-programming โ€บ online-compiler
Online C Compiler - Programiz
Write and run your C programming code using our online compiler. Enjoy additional features like code sharing, dark mode, and support for multiple languages.
๐ŸŒ
Ideone
ideone.com
Online Compiler and IDE >> C/C++, Java, PHP, Python, Perl and 70+ other compilers and interpreters - Ideone.com
Ideone is something more than a pastebin; it's an online compiler and debugging tool which allows to compile and run code online in more than 40 programming languages.
๐ŸŒ
OnlineGDB
onlinegdb.com โ€บ S1MPaZdnf
GDB online Debugger | Code, Compile, Run, Debug online C, C++
Online GDB is online ide with compiler and debugger for C/C++. Code, Compiler, Run, Debug Share code nippets.
๐ŸŒ
Perforce
perforce.com โ€บ blog โ€บ tlv โ€บ debugging-in-c
Debugging in C With TotalView| Perforce Software
This step by step guide showed you how to debug in C, starting with compiling a simple C application and using TotalView graphical debugger.
๐ŸŒ
NextLeap
nextleap.app โ€บ online-compiler โ€บ c-programming
NextLeap - Online C Compiler
Master the C programming language with NextLeap's C Online Compiler. Write, compile, and debug C code online in real time
๐ŸŒ
OneCompiler
onecompiler.com โ€บ c
C Online Compiler
OneCompiler's C Language editor helps you to write, compile, debug and run C code online. It's powered by GCC compiler
๐ŸŒ
OnlineGDB
onlinegdb.com โ€บ online_c_compiler
Online C Compiler - online editor
/****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it.
Top answer
1 of 6
14

For segmentation faults, memory leaks, uninitialized data and such, running your program through valgrind is always a good idea. If you are especially interested in memory leaks, the option "--leak-check=full" pays off.

And yes, learn gdb. It takes a little time, but it's worth it.

2 of 6
12

I think most C compilers on most flavors of *nix support -g to include debugging symbols within the object files, so if you do:

cc -g -c file1.c
cc -g -c file2.c
cc -g file1.o file2.o -o program
./program

Then when you run program if it crashes it should produce a more easily debugged core file. The first two lines just compile source files (producing .o files), the third line tells the compiler to call the linker to link the source files into an executable (passing -g here may not actually do anything if the linker does not have to do anything special to produce an executable with debugging symbols, but it should not hurt anything), and the last line runs the program. You should make sure that you do not tell the compiler to do optimizations when you are trying to debug (unless you find that it does not have errors unless optimizations are turned on) because optimizations typically make the more difficult to follow.

Since I don't know what platform you are on or what tools you have available (or really even what C compiler you are using) so it is difficult to give more specific advice. You should read the man page (manual) for your complier. From the command line type:

man cc

And that should bring up a manual page that tells you lots of things about the compiler on your system. This may tell you how to tell the compiler to produce more warning messages, which could help you find your errors before even running your programs. (note that some warnings may only be produced if you compile with certain optimizations turned on, so even though you probably won't want to debug the optimized program you may want to compile it with optimizations and extra warnings turned on just to see if they tell you anything).

Your Unix system probably has some type of debugger installed. Most Linux machines set up for C development have gdb installed. gdb can be used to run your program in debug mode or to analyze a core file. If you have gdb you can:

gdb ./program

it will start up ready to run your program. If you do:

gdb ./program ./core

it will behave similarly except that it will be as though you were debugging and your program just crashed. From this state the quickest and most helpful thing you can do is to

(gdb) bt

Here (gdb) is the prompt and bt is a command that says to produce a back-trace. That means a call stack, which shows what function the program was in when the failure happened, and what function called that function, and what function called that function, and on and on up to the first function. This can be confusing because it will often show library functions as the most recent called, but this usually means that you have passed in some bad data somewhere along the way that is causing the problem.

gdb is a large and complex program so if it is on your system you should take the time to read up on it.

If it is not on your system then you should find out what similar tools are. Some of the graphical debuggers (either within an IDE or not) act as front ends to command line debuggers and some even support several different command line debuggers, so if you are able to use one of the graphical debuggers you may not actually have to worry about what actual back end command line debugger is being used.

๐ŸŒ
OneCompiler
onecompiler.com โ€บ c โ€บ 3wwhk9azn
exam 1 - C - OneCompiler
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere ...
๐ŸŒ
Reddit
reddit.com โ€บ r/coding โ€บ online ide with compiler and debugger ( for c/c++ )
r/coding on Reddit: Online IDE with compiler and debugger ( For C/C++ )
November 1, 2016 - visual breakpoint setting) instead of gdb commandline ... I don't see any integrated debugging environment with Codechef IDE.