See the following FAQ pages:
Troubleshooting and Diagnostics
Developing
→ Debugging