Pick a Free OS

User login


Introducing Motor, Part 2: Advanced usage

  In the previous article named "Introducing Motor: A Programming IDE

for Linux", I covered the basics of software development using

Motor. Now I continue with a look at some advanced issues such as

debugging, organizing your libraries, version control and a bit

more. By the way, I've just released the new 2.0.0 version of Motor,

so features appearing in this latest release are also covered in this


A Small Address to the Community

Currently, almost all the planned features of Motor have been implemented.

Now, I want to address all the GNU programmers who have experience in

programming with GTK+/GNOME. I realize that a lot of people work in X, so

my next big plan is to make a GNOME-based GUI version of Motor. If you

want to help me create a good IDE -- not only for console, but for X

too, please contact me and we will work out a strategy together.

Debugging with Motor

Motor has a useful front-end to gdb, a popular Linux debugger. Let's

check it out. Start by opening your favorite project to get a quick

insight on what happens inside the program in run time. I assume you

already have Motor running and you can see the editor window. For a

quick look at all the debug commands available, just press F10 and then

open the "Debug" sub-menu.

Before You Debug. Important Note

Motor can only debug programs in local console. That means that you

need to sit in front of your Linux/FreeBSD/whatever box and work on a

local tty. One of those you usually switch with Alt-F1..F12 :) Also

you should have a place to run a debug session, a free tty, Just like

X-Windows needs a free tty to start X display.

"Step into" and "Trace over"

Even a very minimalist gdb front-end allows you to run a program

line-by-line. That usually means you can see the line to be

executed highlighted on your screen, then press a key and move to the

next line, etc. till the program ends. During that, you can either

trace into subroutines called in the line of code or just jump over

them to the next line in the current routine. Motor lets you do it

very easily. Just start your program, not with

"Run" (F12), but with the F8 key. The program starts and then Motor