当前位置: 首页>>代码示例>>PHP>>正文


PHP xdebug_start_trace函数代码示例

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


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


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