Update: 2020-02 added “geany”
is there an ideal IDE for every task?
Nope. Of course just as programming languages every IDE has their pros and cons.
(build for a specific purpose? might serve other purposes also)
There is not a single tool that “does it all” (Eclipse?) and it would be completely against the UNIX philosophy of: build small tools that do one task – but do it well – that can be linked/networked together (most common interface: pipe text streams)
Epiphany: UNIX is an IDE. All of it.1
Well YES OF COURSE 🙂
but just check out this guy: debugging with gdb on command line seems to be A PAIN!
better go with this video:
well actually… there is a super secret “text user interface mode” X-D
let’s gdb debug this program:
#include
#include
int main()
{
int a = 1;
int b = 2;
int c = 3;
printf("Hello world!\n");
return 0;
}
compile:
gcc -g hello.c -o hello.bin
debug:
gdb hello.bin
now one can type
“next… next… next…” to step debug through the code. (well F something would have been better but well X-D)
(this is where one would recommend using Nemiver
or any tool that is gdb compatible/IDEs that use gdb as a debugger “gdb front ends“)
Grew Law: Modern C++ Debugging
“a lot of time developers spend with debugging”
“Debugging is like freezing time and the camera pans around (like in the film Matrix)… that is what a debugger does… and then time can run again” X-D
that is what his company “undo.io” does:
Scripting on a shell is actually already software development.
So whenever an Administrator writes a script – it is already software development (even when there is no compilation involved and debugging… is done usually by trial and error on some test-data? (no step debugging X-D as afaik))
Some people manage to pull of the most amazing things IN PURE BASH! like TETRIS!
And most UNIXES / LINUXes come with a set of tools “ready to go”, and one is a BIG FAN of software minimalism, one thing can’t debug without (sorry one is too stupid) is step debugging.
what one would like to see in an IDE:
- nice, fast “reactive”, if a user pushes a button things should load and happen fast – not: “wait wait wait until spun up this and that”
- (all the IDEs done in Java (Eclipse, NetBeans) tend to start up very slooooow…. (even on a i5 and 8Gbytes of RAM and SSD, also: it is RAM hungry))
- maybe the idea is to NEVER CLOSE THEM (just keep the session open in VM and all the loading is “resume vm”)
- (all the IDEs done in Java (Eclipse, NetBeans) tend to start up very slooooow…. (even on a i5 and 8Gbytes of RAM and SSD, also: it is RAM hungry))
- syntax highlighting
- step debugging (ideally hit an F button to start debugging, (F5 (step into) F6 (step over) F7 (step out) F8 (keep running until next breakpoint))
- one would take it A STEP FURTHER: what debugging client request directly on the server? (IDE running on (test) server, can “halt time” look at why request does not complete with success)
- that is so nicely done with XDebug in PHP, it enables the developer to install and run the IDE (like eclipse pdt) DIRECTLY on the test- (or production?) server and debug user-input as it comes in (also the evil sql injection ones (‘insert spam into database, drop database’))
- THIS IS MASSIVELY COOL for debugging client-server applications (a website “running” on the browser “interpreter” is the client, a webserver + php + database + (IDE) is the server)! (have NEVER seen anything like it somewhere else, maybe Java + Visual Studio can)
- stress free workspace management
- should actually work to:
- create new project/folder/file
- rename project/folder/file
- delete project/folder/file
- open/load project/folder/file
- should actually work to:
- refactoring (renaming variable / function used 1000x times across the project) is a good thing to have.
- optional: git / svn integration would nice but optional (maybe should be a separate tool or git from command line?)
what is out there?
# if tests were done, they were done with/on: hostnamectl Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-8-amd64 Architecture: x86-64 cat /proc/cpuinfo; # i5 with 8GBytes of RAM (giada f300) processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 69 model name : Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz stepping : 1 microcode : 0x17 cpu MHz : 800.836 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit bogomips : 4589.60 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management:
-
Geany
- Geany is a powerful, stable and lightweight programmer’s text editor that provides tons of useful features without bogging down your workflow. It runs on Linux, Windows and MacOS is translated into over 40 languages, and has built-in support for more than 50 programming languages.
- (+) Open Source GPL2.0 https://github.com/geany/geany
- (untested) stability on Linux
- (+) syntax highlighting
- (untested) step debugging integrated
- (untested) code completion (Ctrl+Space should bring up some menu, enter should complete it)
- (+) cross platform
- Windows, OSX, Linux
-
CodeLite
-
- (+) Open Source GPL2.0 https://github.com/eranif/codelite
- (untested) stability on Linux
- (+) syntax highlighting
- (+) step debugging integrated
- (+) code completion (Ctrl+Space should bring up some menu, enter should complete it)
- (+) cross platform
- Windows 64 bit
- OSX 10.14
- apt based: Ubuntu / Debian (comes in the default repo of Debian 10)
-
apt install codelight; # is enough
-
- rpm based: Fedora, RedHat, openSUSE, CentOS
-
-
Qt Creator
- aims at cross plaftform C / C++ development gui applications (even android is supported as build target)
- for example: this android app math game was build with qt: https://play.google.com/store/apps/details?id=com.koderize.Mattemonster&hl=en_US
- (+) Open Source GPL 3 https://github.com/qt-creator/qt-creator
- (stable) stability on Linux
- (+) syntax highlighting
- ( ) pretty powerfull but also pretty complex (can be a little daunting/hard to get started, some documentation might even be outdated, would be nice if qt does a lot of video tutorials on youtube! 🙂
- (+) step debugging integrated
- (+) code completion (Ctrl+Space should bring up some menu, enter should complete it)
- (+) git integration
- (+) comes with it’s own gui designer
- (+) cross platform (linux, osx, win)
-
apt install qtcreator; # install is as easy as this
-
-
Sublime
- Self-Description (from apt info): “Sublime Text is a sophisticated text editor for code, markup and prose”
- definately an IDE with a lot of creative solutions (if it is aimed at C / C++ developers one does not know)
- workspace management:
- there is no such thing as “workspaces” and “projects” in sublime text
- every project (of course) lives is it’s own folder (so a folder = project)
- instead of “new project” the user will create a new folder and go “open folder” which will start a new instance of sublime
- (not the worst of ideas a lot of IDEs struggle with workspace management creating all sorts of extra “.meta” files and stuff)
- docs: http://www.sublimetext.com/docs/3/
- (-) closed Source (?) commercial licence (price 80 bucks)
- (stable) stability on Linux
- (+) syntax highlighting
- (untested) step debugging integrated
- (+) supports XDebug (PHP server side step debugging)
- (+) code completion (Ctrl+Space should bring up some menu, enter should complete it)
- (+) git integration
- (+) cross platform (linux, osx, win)
- setup under Debian 10 is like this: (does not come in default repo because it is NOT Open Source)
-
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - apt-get install apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list apt-get update apt-get install sublime-text subl; # start sublime text editor
- as seen in: http://www.linuxandubuntu.com/home/8-best-ides-or-code-editors-for-linux
- this guy ditched Emacs for Sublime:
-
vim /NeoVim
-
- Vim-fork focused on extensibility and usability https://neovim.io
- What the Ctrl button is to Emacs and Nano is the ESC button in Vim.
- Vim is a great editor that can handle very large files with ease (talking about MegaBytes… took ~10Sec to open 335M debian-10.2.0-amd64-netinst.iso in Vim, Ctrl+C interrupts the loading process (partial load)).
- one really likes vim as text editor, but developing large C\C++ projects do not seem to be a good idea? (although one might be wrong)
- (+) Open Source (src: )
- (untested, probably pretty good) stability on Linux
- (+) syntax highlighting
- (-) step debugging integrated? (does not seem like it)
- can step debugging CÇ++ done in vim?
- at least three options that do just what you require: clewn, pyclewn and vimgdb.All three projects are related.
- vimgdb is a patch against Vim and requires Vim to be recompiled.
- clewn is a standalone program that communicates with Vim through the Netbeans socket interface.
- This requires Vim to be built with the
+netbeans
option (this is the case in recent Linux distributions so it shouldn’t be a problem).To quote from the clewn’s website:
“Clewn implements full gdb support in the vim editor: breakpoints, watch variables, gdb command completion, assembly windows, etc.”
- can step debugging CÇ++ done in vim?
- (+) code completion (Ctrl+Space should bring up some menu, enter should complete it)
- (+) community building is happening
- ( ) cross platform (only for Linux, which is fine for me)
-
apt install neovim; # is enough to install nvim; # start it apt search neovim; # what else is there Sorting... Done Full Text Search... Done lua-nvim/oldstable 0.0.1-25-1 amd64 Lua client for Neovim lua-nvim-dev/oldstable 0.0.1-25-1 amd64 Lua client for Neovim neovim/oldstable,oldstable,now 0.1.7-4+deb9u1 amd64 [installed] heavily refactored vim fork neovim-qt/oldstable 0.2.4-1 amd64 neovim client library and GUI neovim-runtime/oldstable,oldstable,now 0.1.7-4+deb9u1 all [installed,automatic] heavily refactored vim fork (runtime files) ruby-neovim/oldstable 0.3.1-1 all Ruby client for Neovim
-
-
CodeBlocks::
-
- (+) Open Source GPL 3 http://svn.code.sf.net/p/codeblocks/code/trunk/
- (so so) stability on Linux (crashed at least once inside VirtualBox VM Debian 10)
- (+) syntax highlighting
- (+) step debugging integrated
- (+) code completion (Ctrl+Space should bring up some menu, enter should complete it)
- (+) cross platform
-
apt install codeblocks; # is enough to install apt search codeblocks; # what else is there Sorting... Done Full Text Search... Done codeblocks/oldstable 16.01+dfsg-2+b1 amd64 Code::Blocks integrated development environment (IDE) codeblocks-common/oldstable 16.01+dfsg-2 all common files for Code::Blocks IDE codeblocks-contrib/oldstable 16.01+dfsg-2+b1 amd64 contrib plugins for Code::Blocks IDE codeblocks-dbg/oldstable 16.01+dfsg-2+b1 amd64 Code::Blocks debugging libraries codeblocks-dev/oldstable 16.01+dfsg-2+b1 amd64 Code::Blocks development files (SDK) libcodeblocks0/oldstable 16.01+dfsg-2+b1 amd64 Code::Blocks shared library libpath-dispatcher-perl/oldstable 1.05-1 all flexible and extensible dispatcher module
-
-
-
Eclipse CDT
- ( ) Open Source (could not find any github repo?) under it’s own licence https://www.eclipse.org/legal/epl-v10.html
- (so so) stability should be “okay” on Linux (is is a massively complex and big project, so errors will be in there)
- (+) code completion (Ctrl+Space should bring up some menu, enter should complete it)
- (+) syntax highlighting
- (+) step debugging integrated (untested)
- (+) cross platform
- (-) slow Java based
-
NetBeans
- ( ) Open Source http://hg.netbeans.org/main under dual licence: https://netbeans.org/cddl-gplv2.html
- In 2010, Sun (and thus NetBeans) was acquired by Oracle Corporation.
- (untested) stability on Linux
- (+) code completion (Ctrl+Space should bring up some menu, enter should complete it)
- (+) syntax highlighting
- (+) step debugging integrated (untested)
- (+) cross platform
- (-) slow Java based
- ( ) Open Source http://hg.netbeans.org/main under dual licence: https://netbeans.org/cddl-gplv2.html
-
M$’s Visual Studio Code Editor
- (untested) stability on Linux
- (+) code completion (Ctrl+Space should bring up some menu, enter should complete it)
- (+) syntax highlighting
- (+) step debugging integrated (untested)
- (+) cross platform
- (-) ethics: can’t really use this product from a company that is also involved in military contracts (JEDI cloud)
- “Google shows more ethics here: The Force is strong with this one: Google is dropping its bid for a multi-billion dollar Pentagon cloud computing project called JEDI after a spate of employee protests.”
- Google also dropped project the military project Maven aka “AI arms race”
- Project Maven is a Pentagon project involving using machine learning and engineering talent to distinguish people and objects in drone videos,[22] apparently giving the government real-time battlefield command and control, and the ability to track, tag and spy on targets without human involvement.
- Reportedly it stops short of acting as an AI weapons system capable of firing on self-designated targets[23].
- aka “killer Robots” – will they be able to distinguish between combatant and civilians? (highly doubt it, even humans have problems with this) so it will just kill anything that lives. (shoot it until the heat signature dies)
- The project was established in a memo by the U.S. Deputy Secretary of Defense on 26 April 2017.[24] Also known as the Algorithmic Warfare Cross Functional Team,[25] it is, according to Lt. Gen. of the United States Air Force Jack Shanahan in November 2017, a project “designed to be that pilot project, that pathfinder, that spark that kindles the flame front of artificial intelligence across the rest of the [Defense] Department”.[26]
gdb can debug A LOT of languages
GDB supports the following languages (in alphabetical order):
- Ada
- Assembly
- C
- C++
- D
- Fortran
- Go
- Objective-C
- OpenCL
- Modula-2
- Pascal
- Rust
https://www.gnu.org/software/gdb/
debugger front ends/IDEs that use gdb:
-
gdbgui – Feature rich browser-based frontend with data structure visualizations (like DDD), and gdb terminal access. Compatible with C, C++, golang, Rust, fortran. Written in Python and JavaScript. pip install gdbgui.
-
BVRDE – A fully integrated development environment (IDE) for remote cross-platform compiling and debugging of UNIX and LINUX console applications. BVRDE runs on a Windows platform, but compiles and debugs applications on UNIX systems.
-
CLion – A cross-platform C/C++ IDE by JetBrains. It bundles multi-arch GDB debugger, easily switchable to your custom version, and supports remote debug via gdbserver.
-
Eclipse CDT (C/C++ Development Tooling) – The CDT Project provides a fully functional C and C++ Integrated Development Environment based on the Eclipse platform.
-
Eclipse’s Standalone Debugger – Starts up a subset of Eclipse CDT plugins specifically to C/C++ debugging, plus a command-line script which allows an end-user to start up the debugger from the command-line and pass arguments that will start the debugger for the appropriate task.
-
KDevelop – A feature-full, plugin extensible, free, open source IDE for C/C++. Runs on Linux, Solaris, FreeBSD, Mac OS X and other Unix flavors, and Windows as well. It is based on KDE and Qt libraries and is under development since 1998.
-
NetBeans – Although this is the official IDE for Java, it can do C/C++, Fortran and Assembly too. It is plugin extensible, and you’ll find plugins that extend the GDB integration, like e.g., the GDBserver plugin here.
-
Nemiver – An easy to use standalone C/C++ debugger that integrates well in the GNOME environment.
-
Pyclewn – Pyclewn allows using vim as a front end to a debugger.
-
WinGDB – Debugging with GDB under Visual Studio
-
CodeLite – An open source, free, cross platform IDE for the C/C++ programming languages which runs best on all major Platforms ( OSX, Windows and Linux ).
-
Qt Creator – Qt Creator is a cross-platform IDE (integrated development environment) tailored to the needs of Qt developers. It is part of the Qt Project.
-
GNU Emacs (24 and beyond) – See GDB Graphical Interface in the Emacs manual. GDB is just a M-x gdb away.
-
SlickEdit – SlickEdit is a cross-platform, multi-language code editor that gives programmers the ability to code in over 50 languages on 9 platforms, that supports C++ debugging using GDB.
-
Gede – Gede is a graphical frontend (GUI) to GDB written in Qt.
-
Lazarus IDE for the Free Pascal Compiler – A Delphi compatible cross-platform IDE for Rapid Application Development. It has variety of components ready for use and a graphical form designer to easily create complex graphical user interfaces.
- https://sourceware.org/gdb/wiki/GDB%20Front%20Ends
who is who debian C / C++ compilers
Clang project is a C, C++, Objective C and Objective C++ front-end based on the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler Collection (GCC).
Clang implements all of the ISO C++ 1998, 11 and 14 standards and also provides most of the support of C++17.
- clang-3.4
- C, C++ and Objective-C compiler (LLVM based)
- clang-3.5
- C, C++ and Objective-C compiler (LLVM based)
- clang-4.0
- C, C++ and Objective-C compiler
- clang-6.0
- C, C++ and Objective-C compiler
- This is the GNU C++ compiler, a fairly portable optimizing compiler for C++.
- This is a dependency package providing the default GNU C++ compiler.
- g++
- GNU C++ compiler
- g++-4.8
- GNU C++ compiler
- g++-4.9
- GNU C++ compiler
- gcc-mozilla
- GCC, the GNU Compiler Collection
other tools: program flow chart designers
https://opensource.com/article/18/8/flowchart-diagramming-linux
manpages:
# v8 is default in repository Debian 10 gcc --version gcc (Debian 8.3.0-6) 8.3.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. g++ --version g++ (Debian 8.3.0-6) 8.3.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. canoodle@giada:~$ hostnamectl Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-8-amd64 Architecture: x86-64
YouTubes:
NeoVim:
Links:
http://www.linuxandubuntu.com/home/8-best-ides-or-code-editors-for-linux
https://stackoverflow.com/questions/24109/c-ide-for-linux
https://www.tecmint.com/best-linux-ide-editors-source-code-editors/
https://dwaves.de/2015/01/26/russian-robots-and-the-future-of-warfare-or-drone-fare/
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!