PHP code example of mkloubert / vs-remote-debugger
1. Go to this page and download the library: Download mkloubert/vs-remote-debugger library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mkloubert / vs-remote-debugger example snippets
$debugger = new \MJK\Diagnostics\RemoteDebugger();
$debugger->addHost("my.remote.host.or.ip", 23979);
// compress JSON data with GZIP
//
// activate the "gzip" plugin in your
// launch.json file in VS Code!
$debugger->JsonTransformer = function($json) {
return @\gzencode($json);
};
// send the information you want to debug
$debugger->dbg([
'a' => date('Y-m-d H:i:s'),
'b' => 1,
'c' => 2.34,
'd' => 'Marcel K! Marcel K! Marcel K!',
'e' => false,
'f' => null,
'g' => true,
]);