Skip to main content

Debug Info CLI

The debug-info CLI is an auxiliary tool that helps you to upload debug information for your binaries. It is useful when you do not want to deploy binaries with debug information to your production environments, yet you want to utilize Parca Agent. By using the debug-info tool, you can extract and upload the debug information from your binaries to your Parca server and then strip the debug information from the binaries before you deploy them.

Read the docs on symbolization to understand the process.

You can download the latest debug-info` binary release for your architecture from our releases page.

curl -sL https://github.com/parca-dev/parca-agent/releases/download/v0.9.1/parca-agent_0.9.1_`uname -s`_`uname -m`.tar.gz | tar xvfz - parca-debug-info

The debug-info tool has to commands:

Usage: parca-debug-info <command>

Flags:
-h, --help Show context-sensitive help.
--log-level="info" Log level.
--temp-dir="tmp" Temporary directory path to use for object files.

Commands:
upload --store-address=STRING <path> ...
Upload debug information files.

extract <path> ...
Extract debug information.

Run "parca-debug-info <command> --help" for more information on a command.

Upload command to directly extract and upload the debug information to a Parca server:

Usage: parca-debug-info upload --store-address=STRING <path> ...

Upload debug information files.

Arguments:
<path> ... Paths to upload.

Flags:
-h, --help Show context-sensitive help.
--log-level="info" Log level.
--temp-dir="tmp" Temporary directory path to use for object files.

--store-address=STRING gRPC address to sends symbols to.
--bearer-token=STRING Bearer token to authenticate with store.
--bearer-token-file=STRING File to read bearer token from to authenticate with store.
--insecure Send gRPC requests via plaintext instead of TLS.
--insecure-skip-verify Skip TLS certificate verification.
parca-debug-info upload --store-address=localhost:7070 --insecure parca-agent
level=info ts=2021-10-07T12:28:30.710169775Z caller=debuginfo.go:109 msg="debug information uploaded successfully" buildid=324367736569664b3941566c467a727543434d622f576479554f6838735973614362395a71307441742f61754d4a7357616c32695a734e576b77337256472f3836554d764a506b7846656d333936726d417653 file=dist/parca-agent_linux_amd64/parca-agent
level=info ts=2021-10-07T12:28:30.710224803Z caller=main.go:154 msg=done!

And another command Extract to extract the debug information for local investigations.

Usage: parca-debug-info extract <path> ...

Extract debug information.

Arguments:
<path> ... Paths to extract debug information.

Flags:
-h, --help Show context-sensitive help.
--log-level="info" Log level.
--temp-dir="tmp" Temporary directory path to use for object files.

--output-dir="out" Output directory path to use for extracted debug information files.
parca-debug-info extract --insecure parca-agent
level=info ts=2021-10-07T12:30:27.549546915Z caller=main.go:138 msg="debug information extracted" file=out/324367736569664b3941566c467a727543434d622f576479554f6838735973614362395a71307441742f61754d4a7357616c32695a734e576b77337256472f3836554d764a506b7846656d333936726d417653
level=info ts=2021-10-07T12:30:27.549605633Z caller=main.go:154 msg=done!

By default, you can find extracted information in out directory where you executed the tool:

ls out
324367736569664b3941566c467a727543434d622f576479554f6838735973614362395a71307441742f61754d4a7357616c32695a734e576b77337256472f3836554d764a506b7846656d333936726d417653