Tan5en5 / codeigniter-debugbar

CodeIgniter Debug Bar using PHP Debug Bar
MIT License
57 stars 26 forks source link

Debugbar won't show anything. #5

Open indrakaw opened 4 years ago

indrakaw commented 4 years ago

I have following the instruction and able to run this without any problem. This is what I get: image

Attempt 1

Everything works normally until I tried to alter the config file for server render load performance. This is what I changed on config/profile.php:

$config['display_assets']               = FALSE;
$config['display_javascript']           = TRUE;

Then I added these lines on view file:

<link rel="stylesheet" href="/assets/style.css" type="text/css">
<script type="text/javascript" src="/assets/script.js"></script>

These are rendered files produced by CI_Profiler::css_assets() and CI_Profiler::js_assets(). For verify, you can check these: script.js.txt and style.css.txt (I had to rename these extension file to able to upload these).

This is the result: it shows nothing. The html is rendered, thought. image

I tried to add these line onto <head> ... </head> and the result is same.

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/highlight.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/styles/github.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">

I don't think I have to add these since $config['include_vendors'] is identical with previous one (TRUE) as these file rendered.

Attempt 2

Something is definitely wrong here. Instead linking to external resource, I tried to put HTML snippet identically (as written on Profile.php) on view files:

<!-- <link rel="stylesheet" href="/assets/style.css" type="text/css">
<script type="text/javascript" src="/assets/script.js"></script> -->
<?php
        echo '<style type="text/css">'."\n";
        echo CI_Profiler::css_assets();
        echo '</style>'."\n";
        echo '<script type="text/javascript">'."\n";
    echo CI_Profiler::js_assets();
    echo '</script>'."\n";
    // echo CI_Profiler::inline_script();
?>

It went blank.

image

The bar and container is showing, but its content on every tabs is blank. The icons button doesn't work too.

HTML rendered as expected and no error to be found. image

A really long html lines (up to 2924 lines).

Attempt 3

I changed to these:

$config['display_assets']               = FALSE;
$config['display_javascript']           = FALSE;

and these on view file:

        echo '<style type="text/css">'."\n";
        echo CI_Profiler::css_assets();
        echo '</style>'."\n";
        echo '<script type="text/javascript">'."\n";
    echo CI_Profiler::js_assets();
    echo '</script>'."\n";
    echo CI_Profiler::inline_script();

It did show bar as Attempt 2, but worse: image

Please help!

indrakaw commented 4 years ago

@kenjis please help me!