Welcome Guest, Not a member yet? Register   Sign In
Tool bar not showing
#1

I saw that other users on the forum have had similar problems. So please clarify.

The debug toolbar does not appear in any case. In fact, it never appeared in all the installations and tests I did.

My environment is new ci4, recently installed, php 8.4.8, sqlite, windows 11 etc all updated.

In the env file I have:

CI_ENVIRONMENT = development

The website https://codeigniter.com/user_guide/testi...ug-toolbar says:

"The Debug Toolbar is still under construction with several planned features not yet implemented."

So it is not working in ci4, is that it? No matter what we do, it simply will not appear? Correct?

Please clarify.

Thanks.
Reply
#2

To confirm, did you edit the env file? Or the .env file? Should be the latter.

Try:

```
cp env .env
php spark env development
php spark serve
```
Reply
#3

(06-29-2025, 06:36 AM)Luiz Marin Wrote: So it is not working in ci4, is that it? No matter what we do, it simply will not appear? Correct?

No, it does work when everything is installed and configured correctly. Make sure your writable directory has correct permissions (including the directories within it), since that was a stumbling block for me when I was trying to get the debug toolbar to show.
Reply
#4

(This post was last modified: 07-01-2025, 09:05 PM by InsiteFX. Edit Reason: fix layout )

I just setup a new project and the ToolBar is working fine.

1) app/Config/App.php and set your base_url

2) Edit the env file and remark out with a  # sign #CI_ENVIRONMENT = production
     and add below it add  CI_ENVIRONMENT = development.

3) rename the env file to dot .env

That's it that's all I do and  it works fine on laragon with phpStorm CI 4.6.1 and php 8.4.7.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

Here is a demonstration of a clean install of CodeIgniter 4.6.1 which shows the toolbar functioning as expected. You can explore the structure and compare/contrast with your own setup. It only modifies/creates a few files which are app/Config/Paths.php, app/Config/Registrar.php, app/Views/welcome_message.php and writable/default.db. It was installed via composer using the command: composer require codeigniter4/framework rather than the appstarter.
Reply
#6

(This post was last modified: Yesterday, 04:42 AM by Luiz Marin.)

Thank you very much for everyone's response. I will try to answer concisely.
1. All file and directory permissions are ok. (Windows 11)
2. @paulbalandan: If I use .env it returns the errors below (*1). For it to work I need to leave 'env'. But I don't have the toolbar.
3. @InsiteFX: I did this several times in the last few days. When I rename env to .env it returns the errors below (*1).
4. *2 is a copy of my env file.
5. Since I am creating a new project, for the first time with CI4, I will try to reinstall the entire environment to confirm @InsiteFX's thesis. And I will test @paulbalandan's guidance. This project uses sqlite, so I hope I can contribute on this subject as well.
6. @grimpirate: Thanks for the demo. I will investigate further. "It was installed via composer using the command: composer require codeigniter4/framework rather than the appstarter." I used the appstarter, which is the only difference with my installation. I will test it your way.
7. I appreciate more ideas...

*1 ERRORS:

PS C:\marin\CarolCRM> php spark env development

CodeIgniter v4.6.1 Command Line Tool - Server Time: 2025-07-03 11:00:42 UTC+00:00

Error in writing new environment to .env file.

PS C:\marin\CarolCRM> php spark env development
PHP Fatal error:  Uncaught Error: Class "CodeIgniter\Exceptions\InvalidArgumentException" not found in C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Config\DotEnv.php:179
Stack trace:
#0 C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Config\DotEnv.php(129): CodeIgniter\Config\DotEnv->sanitizeValue()
#1 C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Config\DotEnv.php(79): CodeIgniter\Config\DotEnv->normaliseVariable()
#2 C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Config\DotEnv.php(47): CodeIgniter\Config\DotEnv->parse()
#3 C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Boot.php(144): CodeIgniter\Config\DotEnv->load()
#4 C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Boot.php(91): CodeIgniter\Boot::loadDotEnv()
#5 C:\marin\CarolCRM\spark(87): CodeIgniter\Boot::bootSpark()
#6 {main}
  thrown in C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Config\DotEnv.php on line 179

Fatal error: Uncaught Error: Class "CodeIgniter\Exceptions\InvalidArgumentException" not found in C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Config\DotEnv.php:179
Stack trace:
#0 C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Config\DotEnv.php(129): CodeIgniter\Config\DotEnv->sanitizeValue()
#1 C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Config\DotEnv.php(79): CodeIgniter\Config\DotEnv->normaliseVariable()
#2 C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Config\DotEnv.php(47): CodeIgniter\Config\DotEnv->parse()
#3 C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Boot.php(144): CodeIgniter\Config\DotEnv->load()
#4 C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Boot.php(91): CodeIgniter\Boot::loadDotEnv()
#5 C:\marin\CarolCRM\spark(87): CodeIgniter\Boot::bootSpark()
#6 {main}
  thrown in C:\marin\CarolCRM\vendor\codeigniter4\framework\system\Config\DotEnv.php on line 179
PS C:\marin\CarolCRM>



*2 env file:
#--------------------------------------------------------------------
# **Arquivo de Configuração de Ambiente**
#--------------------------------------------------------------------
#  Instrui o PHP CS Fixer a ignorar as verificações de versão do PHP.
PHP_CS_FIXER_IGNORE_ENV = 1

#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------
CI_ENVIRONMENT = development

#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------
app.baseURL = 'http://localhost:8080/'
# app.forceGlobalSecureRequests = false
# app.CSPEnabled = false

#--------------------------------------------------------------------
# DATABASE
#--------------------------------------------------------------------
# Para SQLite:
database.default.hostname =
database.default.database = WRITEPATH . 'database/carolcrm.db'
database.default.username =
database.default.password =
database.default.DBDriver = SQLite3
database.default.foreignKeys = true

#--------------------------------------------------------------------
# ENCRYPTION
#--------------------------------------------------------------------
encryption.key = hex2bin:a43922e019ace85e27f938a89366a02b41530d0789fab942e53013a72acf0605

#--------------------------------------------------------------------
# SESSION
#--------------------------------------------------------------------
# session.driver = 'CodeIgniter\Session\Handlers\FileHandler'
# session.savePath = null

#--------------------------------------------------------------------
# LOGGER
#--------------------------------------------------------------------
# logger.threshold = 4


Well, thanks for your advice. I did a fresh install and used @paulbalandan's tip
The toolbar appears (finally). For some reason the previous installation was buggy. The important thing is that it now works with '.env'.
Again, thanks a lot for the tips.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB