Exam Board:
OCR

Specification:
2020

5.2: Integrated Development Environment

An IDE (Integrated Development Environment) provides programmers with the following facilities (tools) to help create programs:

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 colour coding (e.g. Python turns loop commands orange and print commands purple).
     

  • Statement completion (e.g. offering to auto-complete a command as the user is typing.)

Error Diagnostics & Debugger

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

cost

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.

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.

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.

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 error occurs as the program is being executed, such as dividing a number by zero.

A commonly used example is the Java Runtime Environment. This allows programmers to design a program on one platform (using the programming language Java) which allows the finished program to then be run on many others systems.

A runtime environment enables the tools above such as a trace and breakpoint to be used.

Run Time Environment

Monochrome on Transparent.png

Questo's Questions

5.2 - Integrated Development Environment:

1. Describe the purpose of each type of IDE tool:

  • a. Editor

  • b. Interpreter

  • c. Compiler

  • d. Error Diagnostics / Debugger

  • e. Break point

  • f. Variable Watch / Watch Window

  • g. Trace

  • h. Runtime Environment [2 each]