---
name: "VCP::Debug"
section: "3pm"
platform: "linux"
package: "libvcp-perl"
version: "0.9-20050110-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/VCP::Debug"
---

# VCP::Debug(3pm)

debugging support for VCP

## NAME

VCP::Debug - debugging support for VCP

## SYNOPSIS

## DESCRIPTION

Debugging support for VCP.  Enabled by setting the environment variable VCPDEBUG=1.

- debug

  ```
     debug $foo if debugging $self ;
  ```

  Emits a line of debugging (a "\\n" will be appended).  Use to avoid the "\\n".  Any undefined parameters will be displayed as `"<undef>"`.

- debugging

  ```
     debug "blah" if debugging ;
  ```

  Returns TRUE if the caller's module is being debugged

  ```
     debug "blah" if debugging $self ;
     debug "blah" if debugging $other, $self ; ## ORs the arguments together
  ```

  Returns TRUE if any of the arguments are being debugged.  Plain strings can be passed or blessed references.

- profiling

  Returns true if VCP is profiling itself compared to shell command performance.

  This is different from using perl's profilers (-d:DProf and the like);  this profiling tracks the operation of some of VCP's internals and also how long is spent waiting for child processes to complete.

- $VCP::Debug::profile\_category

  Sets the category for the next profile\_start and profile\_end pair of calls:

  ```
     local $VCP::Debug::profile_category = "p4 files" if profiling;
  ```

- profile\_start

  Notes the current time as the start of a profiling interval.

  Defaults to the category `$profile_category` if none passed.

- profile\_end

  Notes the current time as the end of a profiling interval.

  Defaults to the category `$profile_category` if none passed.

- profile\_group

  Called with the prefix of a set of profile categories to sum up and emit subtotals for.

## COPYRIGHT

Copyright 2000, Perforce Software, Inc.  All Rights Reserved.

This module and the VCP package are licensed according to the terms given in the file LICENSE accompanying this distribution, a copy of which is included in vcp.

## AUTHOR

Barrie Slaymaker \<barries@slaysys.com\>
