CodeIgniter Forums
Help with CodeIgniter 4.0.4 Debugging in VS Code - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: Help with CodeIgniter 4.0.4 Debugging in VS Code (/thread-77319.html)



Help with CodeIgniter 4.0.4 Debugging in VS Code - dspandian - 08-16-2020

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.


RE: Help with CodeIgniter 4.0.4 Debugging in VS Code - InsiteFX - 08-16-2020

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


RE: Help with CodeIgniter 4.0.4 Debugging in VS Code - dspandian - 08-16-2020

(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.


RE: Help with CodeIgniter 4.0.4 Debugging in VS Code - dspandian - 08-16-2020

Thank you very much ? @InsiteFX. Appreciate you help. It worked. I will go through the docs before jumping in further.