aacp/chilldebug

一个用于简化调试的库(希望如此)

1.0 2017-05-27 14:36 UTC

This package is not auto-updated.

Last update: 2024-09-20 22:26:12 UTC


README

#ChillDebug

一个用于简化调试的库(希望如此)

#重要

这个库是WIP。

未完成,必须改进。

欢迎合作或提供反馈。

#用法

<?php
include_once(__DIR__ . '/vendor/autoload.php');

function a_test($str)
{
    echo "\nHi: $str";
}

function b_test($str)
{
    echo "\nHi: $str";
}

function c_test($str)
{
    echo "\nHi: $str";
}
$config = new \ChillDebug\Configuration();
$config->dumpDebugFiles = true;
$config->generateHtmlView = true;
//$config->reportsPath = '/ABSOLUTE/PATH/TO/DUMP/FILES';
$debugger = new \ChillDebug\Debugger();

$debugger->enable();

include 'test2.php';

$string = ' friend';
a_test($string);
a_test($a);
a_test(TEST);


$str = "Xdebug";
function ret_ord( $c )
{
    return ord( $c );
}

foreach ( str_split( $str ) as $char )
{
    echo $char, ": ", ret_ord( $char ), "\n";
}

$debugger->disable();

与HTML模板一起工作

要将PHPStorm的URL处理器注册,请将文件 phpstorm-url-handler.sh 复制到 /usr/local/bin/phpstorm-url-handler 并赋予执行权限

注册URL处理器最后一步是告诉操作系统如何处理 phpstorm:// URL。理想情况下,您应在操作系统级别设置此操作。我发现这篇文章 文章 对KDE4和Gnome有效。如果您无法让事情正常工作,您也可以在浏览器中注册自定义处理器。

对于Firefox,转到about:config,然后右键单击 -> 新建 -> 布尔 -> 名称:network.protocol-handler.expose.pstorm -> 值:false。然后点击链接并选择pstorm处理器脚本。(如果您在上一步出错,请转到首选项 > 应用程序,并在其中查找pstorm)。

对于其他人: http://stackoverflow.com/questions/7087728/custom-protocol-handler-in-chrome 更多信息: https://askubuntu.com/questions/527166/how-to-set-subl-protocol-handler-with-unity