• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP xdebug_start_trace函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中xdebug_start_trace函数的典型用法代码示例。如果您正苦于以下问题:PHP xdebug_start_trace函数的具体用法?PHP xdebug_start_trace怎么用?PHP xdebug_start_trace使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了xdebug_start_trace函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: testCanNotStartWhenStartedByThird

 /**
  * @expectedException RuntimeException
  * @expectedExceptionMessage Can not start tracing, it has already been started.
  */
 public function testCanNotStartWhenStartedByThird()
 {
     xdebug_start_trace();
     $this->stopTraceOnTearDown = true;
     $manager = new TraceManager();
     $manager->start();
 }
开发者ID:renanbr,项目名称:telltale,代码行数:11,代码来源:TraceManagerTest.php


示例2: __construct

 public function __construct($namespace)
 {
     $this->namespace = $namespace;
     $temp = tempnam('', '');
     $this->traceFile = $temp . '.xt';
     xdebug_start_trace($temp, XDEBUG_TRACE_COMPUTERIZED);
 }
开发者ID:rodrigorm,项目名称:audit,代码行数:7,代码来源:TestListener.php


示例3: display

 public function display($tpl = null)
 {
     xdebug_start_trace(JPATH_COMPONENT . '/views/xdebug/function_trace');
     $data = $this->get('Data');
     $this->assign('data', $data);
     parent::display($tpl);
     xdebug_stop_trace();
 }
开发者ID:jlleblanc,项目名称:joomla-development-workflow-presentation,代码行数:8,代码来源:view.html.php


示例4: startXDTrace

 /**
  * Start xdebug trace. Needs xdebug module (apt-get install php5-xdebug).
  * @param string $trace_file (default = '/tmp/php5-xdebug'[.xt])
  */
 public function startXDTrace($trace_file = '/tmp/php5-xdebug.trace')
 {
     xdebug_start_trace($trace_file);
     if (!$this->_xdebug_on) {
         $this->_xdebug_on = !empty(xdebug_get_tracefile_name());
     }
 }
开发者ID:RolandKujundzic,项目名称:rkphplib,代码行数:11,代码来源:Profiler.class.php


示例5: execute

 protected function execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output)
 {
     // scheme code
     $code = $input->getOption(self::OPT_CODE);
     // dealer offset
     $offset = $input->getOption(self::OPT_OFFSET);
     // Start the simulation
     $result = \Akzo\Scheme\Service::getInstance()->initiateSimulation($code, $offset);
     // Check if the scheme has been executed for all dealers, otherwise replay this command with the new offset
     if (isset($result['moreDealersLeft']) && $result['moreDealersLeft']) {
         $cmd = 'php ' . __DIR__ . '/../manageSchemes.php simulate -c ' . $code . ' -o ' . $result['moreDealersOffset'];
         // FIXME: Use Symfony Process instead of plain exec
         //$process = new \Symfony\Component\Process\Process(
         //$cmd
         //);
         //$process->start();
         if ($offset == 670) {
             if (function_exists('xdebug_start_trace')) {
                 xdebug_start_trace();
             }
             $cmd = 'php ' . __DIR__ . '/../manageSchemesX.php simulate -c ' . $code . ' -o ' . $result['moreDealersOffset'];
         }
         $GLOBALS['logger']->info("Starting scheme for more dealers from offset ** {$result['moreDealersOffset']} **" . PHP_EOL . "Command: {$cmd}");
         $output = array();
         $returnVal = 123;
         exec($cmd . ' >/dev/null 2>&1 &', $output, $returnVal);
         $GLOBALS['logger']->info("Got output :" . PHP_EOL . print_r($output, 1) . PHP_EOL . "Return val: " . $returnVal);
     }
 }
开发者ID:Aasit,项目名称:DISCOUNT--SRV-I,代码行数:29,代码来源:SimulateSchemeCommand.php


示例6: startTrace

 public static function startTrace($file = 'trace', $html = true)
 {
     if (!extension_loaded('xdebug')) {
         throw new \RuntimeException('XDebug must be installed to use this function');
     }
     $flag = $html ? XDEBUG_TRACE_HTML : XDEBUG_TRACE_COMPUTERIZED;
     \xdebug_start_trace($file, $flag);
 }
开发者ID:zucchi,项目名称:zucchi,代码行数:8,代码来源:Debug.php


示例7: startTrace

 /**
  * start_trace - turn on xdebug trace
  *
  * Requires xdebug extension
  *
  * @param string $tracefile      file name for trace file
  * @param string $collect_params argument for ini_set('xdebug.collect_params',?)
  *                             Controls display of parameters in trace output
  * @param string $collect_return argument for ini_set('xdebug.collect_return',?)
  *                             Controls display of function return value in trace
  *
  * @return void
  */
 public static function startTrace($tracefile = '', $collect_params = '3', $collect_return = 'On')
 {
     if (function_exists('xdebug_start_trace')) {
         ini_set('xdebug.collect_params', $collect_params);
         ini_set('xdebug.collect_return', $collect_return);
         if ($tracefile == '') {
             $tracefile = XOOPS_VAR_PATH . '/logs/php_trace';
         }
         xdebug_start_trace($tracefile);
     }
 }
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:24,代码来源:Debug.php


示例8: traceStart

function traceStart($fileName = '')
{
    ini_set("xdebug.collect_params", 3);
    ini_set("xdebug.collect_return", 1);
    if (!function_exists('xdebug_is_enabled') || !xdebug_is_enabled()) {
        return;
    }
    if (!$fileName) {
        $fileName = xdebug_call_function();
    }
    xdebug_start_trace(getcwd() . "/log/{$fileName}", XDEBUG_TRACE_APPEND);
}
开发者ID:alencarmo,项目名称:OCF,代码行数:12,代码来源:xdebug.php


示例9: start

 /**
  * Returns the name of the file which is used to trace.
  *
  * @throws \RuntimeException
  * @return string
  */
 public function start()
 {
     if (!static::$file) {
         if (xdebug_get_tracefile_name()) {
             throw new \RuntimeException('Can not start tracing, it has already been started.');
         }
         $file = tempnam(sys_get_temp_dir(), 'telltale');
         xdebug_start_trace($file, \XDEBUG_TRACE_COMPUTERIZED);
         static::$file = $file . '.xt';
     }
     return static::$file;
 }
开发者ID:renanbr,项目名称:telltale,代码行数:18,代码来源:TraceManager.php


示例10: start_trace

 /**
  * If XDebug is installed starts the trace, with full variable contents and variable names.
  * 
  * @param string $trace_file The file to put the trace log in
  * @param int $options
  * 
  * @return void
  */
 public static function start_trace($trace_file, $options = null)
 {
     if (function_exists('xdebug_start_trace')) {
         ini_set('xdebug.collect_params', 4);
         if ($options !== null) {
             xdebug_start_trace($trace_file, $options);
         } else {
             xdebug_start_trace($trace_file);
         }
     } else {
         self::notice('xdebug is not installed');
     }
 }
开发者ID:Borvik,项目名称:Munla,代码行数:21,代码来源:log.php


示例11: start

 static function start()
 {
     if (!self::$traceFile) {
         self::init();
     }
     if (ini_get('xdebug.auto_trace')) {
         return;
     }
     if (self::$running) {
         throw new \BadMethodCallException();
     }
     foreach (static::$ini as $k => $v) {
         self::$iniRestore[$k] = ini_get($k);
         ini_set($k, $v);
     }
     self::$running = true;
     $options = XDEBUG_TRACE_APPEND | XDEBUG_TRACE_COMPUTERIZED | XDEBUG_TRACE_NAKED_FILENAME;
     xdebug_start_trace(self::$traceFile, $options);
 }
开发者ID:shabbyrobe,项目名称:caper,代码行数:19,代码来源:Tracer.php


示例12: xdebug_start_trace

<?php

xdebug_start_trace('/tmp/trace.%p');
require __DIR__ . '/tracing.inc';
$file = xdebug_stop_trace();
xdebug_start_trace($file, XDEBUG_TRACE_APPEND | XDEBUG_TRACE_NAKED_FILENAME);
require __DIR__ . '/tracing.inc';
xdebug_stop_trace();
var_dump(file_get_contents($file));
开发者ID:badlamer,项目名称:hhvm,代码行数:9,代码来源:tracing_4.php


示例13: checkConnection

    /**
     * _checkConnection  Checks if the PDO connection is active
     *
     * @access private
     * @return void
     */
    public function checkConnection() {
        try {
            $st = $this->_conn->query("SELECT 1");
        } catch(\PDOException $pe) {
            if ((strcasecmp($pe->getCode(), 'HY000') !== 0) && !stristr($pe->getMessage(), 'server has gone away'))
                throw $pe;

            if (function_exists('xdebug_start_trace'))
                xdebug_start_trace();

            $this->_resetConnection();
            $this->_connect();
        }

        return true;
    }
开发者ID:Aasit,项目名称:DISCOUNT--SRV-I,代码行数:22,代码来源:DB.php


示例14: startTrace

 /**
  * Starts trace to trace.xt in the current directory.
  * This is for temporary use when debugging.
  * DO NOT CHECK IN A CALL TO THIS FUNCTION.
  */
 public static function startTrace()
 {
     xdebug_start_trace('./trace');
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:9,代码来源:DebugUtil.php


示例15: log

 /**
  * Log same time range
  *
  * @param string  $timePoint  Time range name
  * @param boolean $additional Additional metric flag OPTIONAL
  *
  * @return void
  */
 public function log($timePoint, $additional = false)
 {
     if (!isset($this->points[$timePoint])) {
         $this->points[$timePoint] = array('start' => microtime(true), 'open' => true, 'time' => 0);
         if (self::$useXdebugStackTrace) {
             xdebug_start_trace(LC_DIR_LOG . $timePoint . '.' . microtime(true), XDEBUG_TRACE_COMPUTERIZED);
         }
     } elseif ($this->points[$timePoint]['open']) {
         $range = microtime(true) - $this->points[$timePoint]['start'];
         if ($additional) {
             $this->points[$timePoint]['time'] += $range;
         } else {
             $this->points[$timePoint]['time'] = $range;
         }
         $this->points[$timePoint]['open'] = false;
         if (self::$useXdebugStackTrace) {
             @xdebug_stop_trace();
         }
     } else {
         $this->points[$timePoint]['start'] = microtime(true);
         $this->points[$timePoint]['open'] = true;
         if (self::$useXdebugStackTrace) {
             xdebug_start_trace(LC_DIR_VAR . 'log' . LC_DS . $timePoint . '.' . microtime(true), XDEBUG_TRACE_COMPUTERIZED);
         }
     }
 }
开发者ID:kingsj,项目名称:core,代码行数:34,代码来源:Profiler.php


示例16: ini_set

<?php

ini_set('xdebug.trace_format', 1);
ini_set('xdebug.show_mem_delta', true);
xdebug_start_trace(dirname(__FILE__) . '/Trace');
require_once '../library/HTMLPurifier.auto.php';
$purifier = new HTMLPurifier();
$data = $purifier->purify(file_get_contents('samples/Lexer/4.html'));
xdebug_stop_trace();
开发者ID:hasshy,项目名称:sahana-tw,代码行数:9,代码来源:Trace.php


示例17: gjShowErrors

function gjShowErrors()
{
    //call this first after session start
    error_reporting(E_ALL);
    //for test if sessionstart put it after error_reporting
    ini_set('display_errors', 1);
    // 1 to display errors
    ini_set('log_errors', 1);
    global $gjDebug;
    global $gjLocal;
    //usually have to set this in php.ini
    //xdebug_disable();
    //xdebug.collect_assignments
    ini_set('xdebug.collect_includes', '1');
    ini_set('xdebug.collect_params', '1');
    //terse is 1
    ini_set('xdebug.collect_return', '1');
    ini_set('xdebug.collect_vars', '1');
    //for xdebug_get_declared_vars().
    //xdebug.coverage_enable
    ini_set('xdebug.default_enable', '1');
    ini_set('xdebug.dump.SERVER', 'REQUEST_URI,REQUEST_METHOD');
    ini_set('xdebug.dump.GET', '*');
    ini_set('xdebug.dump.SESSION', '*');
    ini_set('xdebug.dump.REQUEST', '*');
    ini_set('xdebug.dump.FILES', '*');
    ini_set('xdebug.dump.COOKIE', '*');
    ini_set('xdebug.dump_globals', '1');
    //xdebug.dump_undefined
    //xdebug.extended_info  only in php.ini
    //xdebug.file_link_format for IDE
    //xdebug.idekey
    //xdebug.manual_url ,link to php manual  defualt http://www.php.net
    ini_set('xdebug.max_nesting_level', '50');
    //xdebug.overload_var_dump
    //xdebug.profiler_append
    //xdebug.profiler_enable
    // ... more profiler options
    // ... more remote options
    ini_set('xdebug.scream', '1');
    // xdebug.show_exception_trace
    ini_set('xdebug.show_local_vars', '1');
    //xdebug.show_mem_delta
    //xdebug.trace_enable_trigger
    ini_set('xdebug.trace_format', '0');
    //0 is for the editor 1 is for IDEs 2 is html
    // xdebug.trace_options
    //xdebug.trace_output_dir  /tmp
    // bad  see php.ini ini_set('xdebug.trace_output_name', 'F:\tmp');
    ini_set('xdebug.var_display_max_children', '128');
    ini_set('xdebug.var_display_max_data', '-1');
    ini_set('xdebug.var_display_max_depth', '-1');
    //not set up on hosted accounts
    if ($gjLocal) {
        try {
            xdebug_enable();
            if (xdebug_is_enabled()) {
                echo 'stack traces are enabled - debugging<BR>';
                //xdebug_start_error_collection();
                echo 'xdebug_memory_usage() ' . number_format(xdebug_memory_usage()) . '<BR>';
                xdebug_start_trace();
            } else {
                echo 'not debugging<br>';
            }
        } catch (Exception $e) {
            echo 'Caught Exception -> message: ', $e->getMessage(), "\n";
            //   or if extended over ridden exception var_dump e->getMessage()
        }
    }
    /*
    xdebug_start_error_collection();
    Starts recording all notices, warnings and errors and prevents their display
    Xdebug will cause PHP not to display any notices, warnings or errors.
    Instead, they are formatted according to Xdebug's normal error formatting rules
    (ie, the error table with the red exclamation mark) and then stored in a buffer.
    This will continue until you call .
    xdebug_stop_error_collection();
    This buffer's contents can be retrieved by calling
    xdebug_get_collected_errors()
    */
    /*
    $bt = debug_backtrace();
    - Generates a user-level error/warning/notice message
    trigger_error("I want a backtrace", E_USER_ERROR);
    debug_print_backtrace() - Prints a backtrace
    */
}
开发者ID:gmgj,项目名称:gjsoap,代码行数:87,代码来源:gj_utility.inc.php


示例18: process

 function process($tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace)
 {
     switch ($functionName) {
         case $this->TimingPointName:
             $children = $functionChildren;
             $parameters = $functionParameters;
             $id = false;
             if (isset($parameters["id"])) {
                 $id = $tpl->elementValue($parameters["id"], $rootNamespace, $currentNamespace, $functionPlacement);
             }
             $startDescription = "debug-timing-point START: {$id}";
             eZDebug::addTimingPoint($startDescription);
             if (is_array($children)) {
                 foreach (array_keys($children) as $childKey) {
                     $child =& $children[$childKey];
                     $tpl->processNode($child, $textElements, $rootNamespace, $currentNamespace);
                 }
             }
             $endDescription = "debug-timing-point END: {$id}";
             eZDebug::addTimingPoint($endDescription);
             break;
         case $this->AccumulatorName:
             $children = $functionChildren;
             $parameters = $functionParameters;
             $id = false;
             if (isset($parameters["id"])) {
                 $id = $tpl->elementValue($parameters["id"], $rootNamespace, $currentNamespace, $functionPlacement);
             }
             $name = false;
             if (isset($parameters["name"])) {
                 $name = $tpl->elementValue($parameters["name"], $rootNamespace, $currentNamespace, $functionPlacement);
             }
             // Assign a name (as $functionName) which will be used in the debug output.
             $name = ($name === false and $id === false) ? $functionName : $name;
             // To uniquely identify this accumulator.
             $id = $id === false ? uniqID($functionName . '_') : $id;
             eZDebug::accumulatorStart($id, 'Debug-Accumulator', $name);
             if (is_array($children)) {
                 foreach (array_keys($children) as $childKey) {
                     $child =& $children[$childKey];
                     $tpl->processNode($child, $textElements, $rootNamespace, $currentNamespace);
                 }
             }
             eZDebug::accumulatorStop($id);
             break;
         case $this->LogName:
             $parameters = $functionParameters;
             if (isset($parameters['var'])) {
                 $var = $tpl->elementValue($parameters['var'], $rootNamespace, $currentNamespace, $functionPlacement);
             }
             if (isset($parameters['msg'])) {
                 $msg = $tpl->elementValue($parameters['msg'], $rootNamespace, $currentNamespace, $functionPlacement);
             }
             if (isset($var) && isset($msg)) {
                 eZDebug::writeDebug($var, $msg);
             } elseif (isset($msg)) {
                 eZDebug::writeDebug($msg);
             } elseif (isset($var)) {
                 eZDebug::writeDebug($var);
             }
             break;
         case $this->TraceName:
             $children = $functionChildren;
             $id = false;
             // If we have XDebug we start the trace, execute children and stop it
             // if not we just execute the children as normal
             if (extension_loaded('xdebug')) {
                 $parameters = $functionParameters;
                 if (isset($parameters["id"])) {
                     $id = $tpl->elementValue($parameters["id"], $rootNamespace, $currentNamespace, $functionPlacement);
                 }
                 if (!$id) {
                     $id = 'template-debug';
                 }
                 // If we already have a file, make sure it is truncated
                 if (file_exists($id . '.xt')) {
                     $fd = fopen($id, '.xt', 'w');
                     fclose($fd);
                 }
                 xdebug_start_trace($id);
                 if (is_array($children)) {
                     foreach (array_keys($children) as $childKey) {
                         $child =& $children[$childKey];
                         $tpl->processNode($child, $textElements, $rootNamespace, $currentNamespace);
                     }
                 }
                 xdebug_stop_trace();
             } elseif (is_array($children)) {
                 foreach (array_keys($children) as $childKey) {
                     $child =& $children[$childKey];
                     $tpl->processNode($child, $textElements, $rootNamespace, $currentNamespace);
                 }
             }
             break;
     }
 }
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:96,代码来源:eztemplatedebugfunction.php


示例19: getcwd

<?php

require_once getcwd() . "/cli-config.php";
xdebug_start_trace("/tmp/couch");
$cli = new \Symfony\Component\Console\Application('Doctrine CouchDB CLI', Doctrine\ODM\CouchDB\Version::VERSION);
$cli->setHelperSet($helperSet);
$cli->addCommands(array(new \Doctrine\CouchDB\Tools\Console\Command\ReplicationStartCommand(), new \Doctrine\CouchDB\Tools\Console\Command\ReplicationCancelCommand(), new \Doctrine\CouchDB\Tools\Console\Command\ViewCleanupCommand(), new \Doctrine\CouchDB\Tools\Console\Command\CompactDatabaseCommand(), new \Doctrine\CouchDB\Tools\Console\Command\CompactViewCommand(), new \Doctrine\CouchDB\Tools\Console\Command\MigrationCommand(), new \Doctrine\ODM\CouchDB\Tools\Console\Command\UpdateDesignDocCommand()));
$cli->run();
开发者ID:doctrine,项目名称:couchdb-odm,代码行数:8,代码来源:doctrine.php


示例20: start_trace

function start_trace()
{
    xdebug_start_trace('/tmp/trace.%p');
}
开发者ID:badlamer,项目名称:hhvm,代码行数:4,代码来源:tracing_2.php



注:本文中的xdebug_start_trace函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP xdebug_stop_code_coverage函数代码示例发布时间:2022-05-23
下一篇:
PHP xdebug_start_code_coverage函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap