Troubleshooting Tips
Our main purpose here at Code Institute is to help you become good coders.
Our main purpose here at Code Institute is to help you become good coders.
Coding is the art of solving problems with precise instructions. At times, it can feel like magic - the computer does exactly what you type, but not always what you intended.
Unlike physical arts, where materials guide you with natural limits, coding has almost no boundaries. Programming languages can solve any problem that’s solvable, but only if you can clearly describe the steps. The main challenge is complexity: breaking down ideas into small, simple, and logical parts.
As you learn to code, you will often get stuck. This is normal. Being “stuck” means your current way of thinking can’t solve the problem. The way forward is to pause, step back, and try a new approach.
Troubleshooting is the skill of identifying and resolving issues in your code. The sections that follow will give you practical strategies to get unstuck and keep moving forward.
id
for multiple
elements.
class
when you need to style multiple
elements.
Ctrl+Shift+P
- type “reindent”).
return
on one line and the value
on the next may break because JS inserts a semicolon
right after return
.
console.log()
to print variable values
and see what’s happening.
IndexError: list index out of range
- you
tried to access an element in a list that doesn’t
exist.
print()
to show the
values of variables.
pdb
(Python Debugger).AI can be a helpful tool when you’re stuck, but it works best if you ask clearly. Think of it like asking a tutor or mentor - the quality of the answer depends on how well you explain the problem.
IndexError
when I reach the end. Here’s my
code…”
TypeError: unsupported operand type(s) for +: 'int' and
'str'.
Use AI as a learning partner, not just a shortcut. It should help you understand problems, not just copy and paste solutions.
command not found
, it usually means
there’s a typo.
ls
(list files) is
not the same as LS
.
I
l
pwd
to show your current directory.ls
to list the files there.--help
.man
(e.g.,
man ls
).
git add
, git commit
git help add
or man git-add
for
details.
/
to search, n
for next match,
q
to quit.
i
= insert mode (edit text).Esc
= back to normal.Shift+ZZ
= save and quit or
:q!
= quit without saving.
Ctrl+C
= stop.Ctrl+Z
= pause - then fg
(resume
foreground) or bg
(resume background).
kill -9 %1
.lsof -i tcp:8000
- find PID.kill -9 PID
- stop process.netstat -o -b -n
to list processes.
taskkill /f /pid 1736
(replace with
correct PID).