Is it possible to debug our programs written in c by gedit text editor ? If not, how can i do it ?
gedit external terminal plug-in
You can use
gedit with terminal plugin. The steps are fairly straight-forward:
- Enable "Universe" repository
- Activate "Embedded Terminal"
- Use Ctrl+F9 to open terminal
Step 1. Enable "Universe" repository
The first step is to ensure
Universe repository is activated from
Software & Updates->
Ubuntu Software and ensure the third option is checked:
Step 2. Install
gedit-plugs with the command:
sudo apt install gedit-plugins
Step 3. Activate "Embedded Terminal"
gedit (don't use
sudo) and select
Plugins and check off
Step 4. Use Ctrl+F9 to open terminal
In the GIF below we use Ctrl+F9 to get a tiny window with the command prompt. Use the mouse to click and drag the dividing line up to reveal an approximate size of 24x80.
The colors are dreadful! (with default
gedit color scheme). I was just learning this as creating the answer so my mouse movements are slow below...
Step 5. Other
As mentioned in Step 4., you can grab the separator bar to make the terminal window bigger. Here's what it looks like in a normal picture ((not a GIF).
There are three other plug-ins I currently use in the
gedit coding window:
- plug-in to display 80 character cut-off with different background color
- plug-in to display entire document in thumbnail you can drag to quickly go to code section
- Highlight matching brackets
Additionally there is an external add-on I'd like to install for
shellcheck linter / checker that shows bash code errors. I haven't searched for a lint checker for other languages but obviously you can enter
gcc and other commands directly into
gedit terminal window.
For further reading please see: