5.2 IDE Flashcards
What is an IDE
An IDE (Integrated Development Environment) provides programmers with the following facilities (tools) to help create programs
What are the tools found in an IDE
. Editor
. Compilers & Interpreters
. Break Point
. Variable Watch / Watch Window
. Trace
. Error Diagnostics & Debugger
Editor
The editor is software that allows a programmer to enter and edit source code.
Editor features may include:
Automatic formatting (e-g. automatic indentation).
Automatic line numbering (this helps to identify exactly where an error has occurred).
Automatic color coding (e-g. Python turns loop commands orange and print commands purple).
Statement completion (eg. offering to auto-complete a command as the user is typing:)
Compilers & Interpreters
Both tools convert the source code written by a programmer into machine code to be executed by the CPU.
A compiler converts the entire source code into executable machine code at once. After compilation, the
program can be run again without having to recompile each time.
An interpreter converts source code into machine code line by line. An interpreter must reinterpret the
code each time the program is required to run. See 5.1 for both types of translators.
Break Point
The programmer selects a specific line and
the program displays the variable value at
that point.
The code can then be executed one line at a
time to find exactly where the error occurs.
This process is called single-stepping.
Variable Watch / Watch Window
Displays the current value of a selected
variable.
A variable can be watched line-by-line to see
how the value changes.
Trace
Logs the values of variables and outputs
of the program as the code is executed line
by line.
Error Diagnostics & Debugger
Both tools are used to display information about
an error when it occurs, such as the line it occurred
on and the error type (e.g. syntax).
These tools may also suggest solutions to help the
programmer to find and fix the error.
What is a Runtime Environment
A runtime environment allows a program to run on a computer system. It checks for runtime errors
and allows users to test the program.
A runtime environment enables the tools above such as a trace and breakpoint to be used.
What is a runtime error
A runtime error occurs as the program is being executed, such as dividing a number by zero.