Make sure you have installed debugbar via composer.
Copy this script to the root folder of you application and run it from there.
In your template file, which will usually be located in ./src/layout-templates, add the code below inside the head section of the template:
<link rel="stylesheet" type="text/css" href="<?= s3MVC_MakeLink('/css/debugbar-css-assets.css'); ?>">
<script type="text/javascript" src="<?= s3MVC_MakeLink('/js/debugbar-js-assets.js'); ?>"></script>
<!-- include the line below if you are using JQuery -->
<script type="text/javascript">jQuery.noConflict(true);</script>
In the body section of your your template file add the code below to a suitable part where you want the debugbar panel to be displayed:
<?php echo $debugbar->getJavascriptRenderer()->render(); ?>
It is assumed that $debugbar is an instance of DebugBar\StandardDebugBar you have configured and is available to your template file.
You are done at this point, debugbar should be visible on the pages of your website now. Obviously it expected that you would have added messages to $debugbar before it is rendered in the template.