Title: HookTrace &#8211; Trace Hooks with Precision
Author: SmilingSyntax
Published: <strong>2026 年 1 月 8 日</strong>
Last modified: 2026 年 1 月 14 日

---

搜尋外掛

![](https://ps.w.org/hooktrace/assets/banner-772x250.png?rev=3439673)

![](https://ps.w.org/hooktrace/assets/icon-256x256.png?rev=3435404)

# HookTrace – Trace Hooks with Precision

 由 [SmilingSyntax](https://profiles.wordpress.org/smilingsyntax/) 開發

[下載](https://downloads.wordpress.org/plugin/hooktrace.1.1.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/hooktrace/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/hooktrace/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/hooktrace/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/hooktrace/#developers)

 [技術支援](https://wordpress.org/support/plugin/hooktrace/)

## 外掛說明

HookTrace is a developer observability tool that records and visualizes the runtime
execution order of WordPress hooks, filters, and plugin initialization for a single
page request.

**For Developers Only**

This plugin is designed exclusively for development and staging environments. It
helps developers understand:

 * Which hooks fired, in what order
 * Which callbacks executed on each hook
 * Callback priority and execution time
 * Source plugin, theme, or core location
 * Exact file and line number
 * Plugin and theme load timeline

**Key Features:**

 * **Hook List Tracking** – Records all hooks that fire during a page request with
   type and source information
 * **Detailed Callback Inspection** – When a hook is selected, displays comprehensive
   callback information including priority, execution order, duration, file path,
   and source
 * **Modern Modal UI** – Beautiful, searchable interface with filtering capabilities
 * **Zero Performance Impact** – In-memory storage only, no database writes
 * **Early Boot Support** – MU-plugin bootstrap captures hooks from the very beginning

**Requirements:**

 * `WP_DEBUG` must be set to `true` in `wp-config.php`
 * User must have `manage_options` capability (administrator)
 * PHP 8.0 or higher

**Safety Features:**

 * Automatically disables when `WP_DEBUG` is false
 * Never runs for non-admin users
 * Never modifies WordPress behavior
 * Observational only – no code execution changes

## 螢幕擷圖

 * [[
 * Hook list view showing all hooks that fired, with search and filter options
 * [[
 * Selected hook detail view showing all callbacks with priority, execution order,
   duration, and file paths
 * [[
 * Color-coded badges indicating source (core/theme/plugin) and type (action/filter)
 * [[
 * [[
 * [[

## 安裝方式

 1. Upload the `hooktrace` folder to `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Ensure `WP_DEBUG` is set to `true` in your `wp-config.php` file
 4. (Optional) For early hook capture, copy `hooktrace-bootstrap.php` from the plugin
    directory to `/wp-content/mu-plugins/`

## 常見問題集

### Does this plugin work in production?

No. This plugin is designed exclusively for development and staging environments.
It requires `WP_DEBUG` to be enabled and will automatically disable itself if `WP_DEBUG`
is false.

### Will this slow down my site?

The plugin is designed with minimal overhead (5-10ms average). However, it should
only be used in development/staging environments where performance is not critical.

### Do I need to install the MU-plugin bootstrap?

The MU-plugin bootstrap is optional but recommended. It allows the plugin to capture
hooks from the very beginning of WordPress initialization, including must-use plugins
and early core hooks.

### Can I use this to debug plugin conflicts?

Yes! The timeline view shows which hooks fire and which plugins are registering 
callbacks, making it easier to identify conflicts and execution order issues.

### Does this modify WordPress behavior?

No. This plugin is purely observational. It never modifies hook execution, suppresses
errors, or changes WordPress behavior in any way.

### What data is stored?

No data is stored. All trace information is kept in memory for the current request
only and is discarded after the page loads.

### How do I inspect a specific hook?

Click on any hook in the list to see detailed information about all callbacks registered
for that hook, including priority, execution order, duration, and source file location.

## 使用者評論

![](https://secure.gravatar.com/avatar/98195d228e9177e36ca8a13d4c674356c6df724a3e0468dc646c9cc872a077a8?
s=60&d=retro&r=g)

### 󠀁[Brilliant!](https://wordpress.org/support/topic/brilliant-1685/)󠁿

 [Bowo](https://profiles.wordpress.org/qriouslad/) 2026 年 1 月 12 日 1 則留言

I think this is a brilliant piece of dev tool! Although Query Monitor has something
similar, this plugin has a singular focus and thus, have a wider possibility to 
be useful in this particular area of seeng and analyzing what’s happening on each
and every hook fired. Looking forward to explore using it more in my dev workflow.
Thank you for developing it.

 [ 閱讀全部 1 則使用者評論 ](https://wordpress.org/support/plugin/hooktrace/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈HookTrace – Trace Hooks with Precision〉的開發相關工作。

參與者

 *   [ SmilingSyntax ](https://profiles.wordpress.org/smilingsyntax/)
 *   [ Manjul ](https://profiles.wordpress.org/codemadan/)

[將〈HookTrace – Trace Hooks with Precision〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/hooktrace)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/hooktrace/)、查看
[SVN 存放庫](https://plugins.svn.wordpress.org/hooktrace/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/hooktrace/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/hooktrace/)。

## 變更記錄

#### 1.1.0

 * Added local editor integration – Open files directly in your favorite IDE (VS
   Code, PhpStorm, Sublime Text, Atom, Cursor, Antigravity, or custom protocol)
 * Added settings page (Tools  HookTrace) for configuring local editor and path 
   mapping
 * Added function filter for single hook tracing – Filter callbacks by function 
   name
 * Added execution statistics – Display min, max, avg, and total execution time 
   for filtered functions
 * Improved callback execution tracking – Each callback execution is now tracked
   separately with accurate timing
 * Enhanced UI/UX – Single scroll area, sticky filter and stats, more compact callback
   items
 * Improved labels – Full descriptive words instead of abbreviations (Priority, 
   Execution Order, etc.)
 * Added translation support – All strings are now translatable with POT file included
 * Added dual editor links – Display both local editor and WordPress editor links
   when available
 * Improved modal positioning – Aligned to top to prevent flickering with dynamic
   content

#### 1.0.0

 * Initial release
 * Hook list tracking (all hooks that fire)
 * Detailed callback inspection for selected hooks
 * Modern modal UI with search and filtering
 * Admin bar integration
 * MU-plugin bootstrap support
 * Color-coded badges for source and type identification
 * Responsive design with smooth animations

## 中繼資料

 *  版本 **1.1.0**
 *  最後更新 **3 個月前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 5.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.9.4**
 *  PHP 版本需求 ** 8.0 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/hooktrace/)
 * 標籤
 * [debugging](https://tw.wordpress.org/plugins/tags/debugging/)[hooks](https://tw.wordpress.org/plugins/tags/hooks/)
   [profiling](https://tw.wordpress.org/plugins/tags/profiling/)[trace](https://tw.wordpress.org/plugins/tags/trace/)
 *  [進階檢視](https://tw.wordpress.org/plugins/hooktrace/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  1 個 5 星使用者評論     ](https://wordpress.org/support/plugin/hooktrace/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/hooktrace/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/hooktrace/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/hooktrace/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/hooktrace/reviews/?filter=1)

[新增使用者評論](https://wordpress.org/support/plugin/hooktrace/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/hooktrace/reviews/)

## 參與者

 *   [ SmilingSyntax ](https://profiles.wordpress.org/smilingsyntax/)
 *   [ Manjul ](https://profiles.wordpress.org/codemadan/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/hooktrace/)