• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to enable debug toolbar in CI4.0.0-rc.3

#21
(01-17-2020, 12:55 PM)littlej Wrote: Hello mate ! I had a similar issue before, using CI in a subfolder. What does your browser's console says ? Unable to reach some files ?
In a local environment, set your base_url to "http://localhost:8080/", then in your console launch "php spark serve". Is it working now with your app ?

Hey Littlej, I had initially thought your post had ended up in this thread by accident... in part because it was replying to my post that said I'd manage to work around the problem... but the missing debug toolbar problem has come back... and in my searches for possible fixes, I see that Hbonds has another thread that also points to subfolder's being a problem (https://forum.codeigniter.com/thread-751...t=debugbar).

My installation has CI just above the root of my base_url (which, I believe, is the default location, so I've never experienced files not being found)... and the base_url has always been set in App.php (and never given any issues in terms of locating resources).  I have also tried setting it (the same as what's set in App.php) in the .env config file (which was previously commented out)... just in case (with and without the port.  I'm using the HTTP default, 80, though I did try your 8080 suggestion too, in the event there was something that I was missing (and which seems to be the default port set CI’s Serve.php)).

After some experimentation, I find that if I use the redirect()->to(base_url().'AnyController/anyMethod'); command to redirect to ANYWHERE other than the (plain) base_url(), even if it’s to a controller set in \Config\Routes.php, then on the new page (even a simple/essentially empty page, that doesn’t have anything that could cause a problem), the toolbar has disappeared.  The JavaScript for the toolbar (toolbar.js) doesn’t seem to get loaded… which is why it doesn’t have the bar injected into the DOM to be displayed (but I’ve not figured out why, as yet).

… so any other ideas/suggestions would be appreciated.

Thanks,
Gary
Reply


Messages In This Thread
RE: How to enable debug toolbar in CI4.0.0-rc.3 - by Gary - 01-19-2020, 06:52 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.