Ways to debug
Jump to navigation
Jump to search
1. CSS/Design
- To locate the file from browser
i. Right-click on the element and click inspect.
ii. Edit on inspect element
2. MVC has debug function
- display_error_key
i. Control what error type to show
- Check error in error log
- Debug mode under conflict
i. Set debug mode to 1.
ii. Put IP address to debug ip
* type myip in google or open CMD and type ipconfig.
3. PHP
- Custom code the debug in your function
i. debug::array[<error>]
- Look code line-by-line
- Comment all code, then run line-by-line until you find the error.
4. JavaScript
- Console.log
- Right-click browser and click inspect. Click DOM tab to display the error.
5. UI
- Always start from template.
- Always touch the CSS
i. app.css is foundation (Do not touch)
ii. style.css = overwrite app.css (Only change for front end).
- Themes -> Include file
i. header
ii. footer
iii. style
- Test on every screen
i. Install plug-in
- Never define individual at style.css
i. Every page has their own css. E.g. register.inc.php
- Never touch/change javascript inside js folder
i. Add/edit inside inc folder. E.g. admin.scripts_bottom.inc
ii. Add/edit inside individual .inc page. Example: member>inc>index.bottom.inc.php