What is an IDE?
An IDE has the tools a programmer needs, all in one program.
Hello Sam
Key facts
| Tool | What it does | Examples |
|---|---|---|
| Editor | Enter and edit the code | Syntax highlighting / pretty printing (key words/commands coloured, neat layout), line numbers, auto-indent, auto-complete (key commands predicted) |
| Error diagnostics | Find and fix errors | Error message with the line number and type of error (e.g. SyntaxError, line 2), breakpoints, stepping, variable watch |
| Run-time environment | Run and test the program | Output window, testing the program |
| Translator | Convert the code to machine code | Built-in compiler or interpreter |
Examples of IDEs: IDLE, Thonny, Visual Studio Code, PyCharm.
ActivitySort it: which IDE tool?
ActivityWhich tool would you use?
The editor
Tap a feature to see the code with and without it.
Editor features and how they help
| Feature | How it helps |
|---|---|
| Line numbers | Find the line an error is on |
| Syntax highlighting / pretty printing | Colours key words/commands, text and numbers and lays the code out neatly: easier to read, mistakes easier to spot |
| Auto-indent | Keeps the code laid out correctly |
| Auto-complete | Predicts the key word/command as you type: saves time and mistakes with key words/commands |
ActivitySort it: which editor feature?
Error diagnostics
Tools that help the programmer find and fix errors.
Error messages
Step through the program
| Variable | Value |
|---|
Error diagnostics tools
| Tool | How it helps |
|---|---|
| Error message | Shows the type of error and the line it is on. May suggest a fix |
| Breakpoint | Pauses the program at a line you choose |
| Stepping | Runs the program one line at a time |
| Variable watch | Shows the values of variables, so you can see where one goes wrong |
ActivitySort it: which debugging tool?
Run-time environment and translators
What happens when the programmer presses Run.
Press Run
Testing inside the IDE
Run-time environment and translator
Run-time environment
- Runs and tests the program in the IDE
- Shows the output
- Can include an emulator
Translator
- Converts source code to machine code
- Built into the IDE
- A compiler or an interpreter
ActivityPut the steps in order
ActivityFill the gaps
Exam questions
Type your answer, then mark it against the mark scheme.
Exam practice
Answer 10 questions correctly to finish this step.