mkloubert/vs-remote-debugger

Classes that can be used with 'vs-remote-debugger' Visual Studio Code extension

2.1.0 2016-11-15 02:31 UTC

This package is not auto-updated.

Last update: 2024-09-14 19:20:19 UTC


README

Latest Stable Version

Server-side PHP library for interacting with vs-remote-debugger Visual Studio Code extension, e.g.

Donate

License

MIT license

Install

Install the RemoteDebugger.php in your application.

A common way is to use Composer to install anything via Packagist.org:

composer require mkloubert/vs-remote-debugger

Usage

If you look at the example code you can see how the class can be used:

$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,
]);

A possible result can be this here:

VS Code screenshot 1