Add Valgrind to CLion

Valgrind is an open-source memory debugger and you can use throught CLion (C IDE).
I found this site where they show step by step how to add valgrim as external application to CLion.

But... some mistakes that you could eventually find:

1.- You must install clang and obiously valgring:

sudo apt-get install clang valgrind

2.- Modify the path to valgrim in valgrim.sh. Replace /usr/local/bin/valgrim by /usr/bin/valgrim

3.- You can find external tools configuration on: File/Settings.../Tools/External Tools

4.- If you want the real icon to put it on toolbar, follow these commands:

convert logo_valgrind.png -resize 16x16 logo.png

Now you can choose it to your toolbar







If you run your code and you got no errors but suppressed errors, don't be afraid:












You can see suppressed errors in /usr/lib/valgrind/default.supp 
Also, the suppressed errors are just errors that are system specific, known problems with your libraries.  Not from your code.

Enjoy it!

Comments

Popular posts from this blog

How to fix Android when developer options are not available for this user

Exception: Could not find a default OpenFlow controller in Mininet

v4l2: open /dev/video0: Permission denied