CodeIgniter Forums

Full Version: Help with CodeIgniter 4.0.4 Debugging in VS Code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Am new to PHP and from NodeJS dev. I would like to know how to set up debugging PHP especially CodeIgniter in VS Code.
I Installed PHP latest and CodeIGniter latest and created appStarter project and able to serve using "php spark serve" in port 9000. I would like to set break points and run the code igniter project and debug it. I explored so many SO posts and Xdebug, PHP Debug but non helped.

Any help or guidence much appreciated. Thank you.
1) Edit the env file in the root and add this:

Code:
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------

# CI_ENVIRONMENT = production
CI_ENVIRONMENT = developement

2) Save the file as .env

3) To turn off the debug bar just rename the file back to env

4) SEECodeIgniter 4 User Guide - Testing
(08-16-2020, 07:52 AM)InsiteFX Wrote: [ -> ]1) Edit the env file in the root and add this:

Code:
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------

# CI_ENVIRONMENT = production
CI_ENVIRONMENT = developement

2) Save the file as .env

3) To turn off the debug bar just rename the file back to env

4) SEECodeIgniter 4 User Guide - Testing

Thank you InsiteFX for the reply, will try and let you know.
Thank you very much ? @InsiteFX. Appreciate you help. It worked. I will go through the docs before jumping in further.