# 使用 Homebrew, MacPorts 安装 cdebug

查看 cdebug 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:cdebug
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cdebug
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cdebug
```

  证据: MacPorts ports tree: sysutils/cdebug/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:cdebug
- **软件包管理器:** Homebrew
- **版本:** 0.0.19
- **来源摘要:** Swiss army knife of container debugging
- **主页:** <https://iximiuz.com/en/posts/docker-debug-slim-containers/>
- **仓库:** <https://github.com/iximiuz/cdebug>
- **最后更新:** 2026-07-27T19:20:57+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cdebug (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.0.19
## 项目历史与用法

cdebug is a Go-based command-line tool for debugging containers and Kubernetes pods, especially slim, scratch, and distroless images that do not include a shell or troubleshooting tools.

### 项目历史

The upstream README calls cdebug a 'swiss army knife of container debugging' and documents commands for exec-style debugging, local port forwarding, and exporting or inspecting container filesystems. Its exec workflow is explicitly based on ideas from the iximiuz article about debugging slim Docker containers.

The GitHub releases begin with v0.0.1 on 2022-11-06 and continue through v0.0.19 on 2026-01-18, showing an active small-tool release history around container debugging workflows.

### 采用历史

cdebug entered package-manager culture as a modern container-debugging utility rather than a classic Unix tool. The Homebrew input records Homebrew and MacPorts packaging, and the upstream README documents Homebrew installation for macOS and Linux.

### 使用方式

Users run cdebug exec against Docker, containerd, nerdctl, or Kubernetes targets to start a temporary debugging sidecar whose tools are available in the target container's filesystem view. The README also documents cdebug port-forward for exposing unpublished or localhost-only container ports.

### 为什么软件包爱好者会关心

cdebug is notable because it packages a container namespace trick into a single statically linked binary. It sits in the practical space between docker exec, kubectl debug, nsenter-style debugging, and ad hoc sidecar containers, which makes it attractive to operators dealing with minimal images.

### 时间线

- 2022-11-06: v0.0.1 and v0.0.2 published.
- 2022-12: v0.0.4 through v0.0.6 published.
- 2023: Multiple releases through v0.0.14.
- 2024: v0.0.15 through v0.0.18 published.
- 2026-01-18: v0.0.19 published.

### Related projects

- The upstream README frames cdebug exec as a cross between docker exec and kubectl debug, and points to Nixery as a way to build custom debugging images.

### 来源

- <https://api.github.com/repos/iximiuz/cdebug>
- <https://github.com/iximiuz/cdebug>
- <https://iximiuz.com/en/posts/docker-debug-slim-containers/>
- <https://github.com/iximiuz/cdebug#readme>
- <https://formulae.brew.sh/api/formula/cdebug.json>
- <https://github.com/iximiuz/cdebug/releases>
- <https://iximiuz.com/en/posts/docker-debug-slim-containers>


## 安全说明

infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- infrastructure mutation or orchestration signal

## 其他软件包管理器记录

- MacPorts - cdebug: normalized package name match | MacPorts ports tree: sysutils/cdebug/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/cdebug.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cdebug.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
