Ask coding questions

← Back to all posts
DEBUGGING ON C++
h
joelmtebe (0)

I am trying to see if there is memoryleak on my project i have created. is there a way to check through here?
i know on visual studio you can use extensions like debugger or so,

Comments
hotnewtop
19ecal (232)

Try gdb. here's a tutorial https://www.cs.cmu.edu/~gilpin/tutorial/
you will need to compile your c++ first with clang or gcc, (gcc -o main main.cpp)
then do gdb main
and have a look around

19ecal (232)

I forgot you need to link the stdlib with -lstdc++ if you are using gcc

Coder100 (18187)

no, replit does not have a C++ debugger, in fact, they lack a working debugger in all languages. It's being worked on for python, and maybe soon it will be ported to nodejs, and later for C++ too. Just use visual studio for a better C++ editing experience