

<!DOCTYPE html>

<html lang="en-US">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">

  <link rel="stylesheet" href="/peeka/assets/css/just-the-docs-default.css">

  <link rel="stylesheet" href="/peeka/assets/css/just-the-docs-head-nav.css" id="jtd-head-nav-stylesheet">

  <style id="jtd-nav-activation">
  
    .site-nav ul li a {
      background-image: none;
    }

  </style>

  

  
    <script src="/peeka/assets/js/vendor/lunr.min.js"></script>
  

  <script src="/peeka/assets/js/just-the-docs.js"></script>

  <meta name="viewport" content="width=device-width, initial-scale=1">

  



  <!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Peeka | Python 运行时诊断工具 - 基于 PEP 768 的非侵入式函数观测</title>
<meta name="generator" content="Jekyll v4.4.1" />
<meta property="og:title" content="Peeka" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Python 运行时诊断工具 - 基于 PEP 768 的非侵入式函数观测" />
<meta property="og:description" content="Python 运行时诊断工具 - 基于 PEP 768 的非侵入式函数观测" />
<link rel="canonical" href="https://wwulfric.github.io/peeka/assets/css/just-the-docs-head-nav.css" />
<meta property="og:url" content="https://wwulfric.github.io/peeka/assets/css/just-the-docs-head-nav.css" />
<meta property="og:site_name" content="Peeka" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Peeka" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebPage","description":"Python 运行时诊断工具 - 基于 PEP 768 的非侵入式函数观测","headline":"Peeka","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://wwulfric.github.io/peeka/assets/images/logo.png"}},"url":"https://wwulfric.github.io/peeka/assets/css/just-the-docs-head-nav.css"}</script>
<!-- End Jekyll SEO tag -->


  <!-- Floating back-to-top button -->
<button class="back-to-top-btn" id="back-to-top-btn" aria-label="Back to top" title="Back to top">
  <svg viewBox="0 0 24 24"><polyline points="18 15 12 9 6 15"></polyline></svg>
</button>

<script>
document.addEventListener("DOMContentLoaded", function() {
  // =========================================================================
  // Back-to-top button
  // =========================================================================
  var btn = document.getElementById("back-to-top-btn");
  if (btn) {
    window.addEventListener("scroll", function() {
      if (window.scrollY > 300) {
        btn.classList.add("visible");
      } else {
        btn.classList.remove("visible");
      }
    });
    btn.addEventListener("click", function() {
      window.scrollTo({ top: 0, behavior: "smooth" });
    });
  }

  // =========================================================================
  // Right-side sticky TOC — generated from page headings
  // =========================================================================
  var mainContent = document.getElementById("main-content");
  if (!mainContent) return;

  // Collect h2 and h3 headings (skip .no_toc)
  var headings = mainContent.querySelectorAll("h2, h3");
  var tocItems = [];
  for (var i = 0; i < headings.length; i++) {
    var h = headings[i];
    if (h.classList.contains("no_toc")) continue;
    if (!h.id) continue;
    // Extract heading text: clone node, remove anchor-heading links, get clean text
    var clone = h.cloneNode(true);
    var anchors = clone.querySelectorAll('.anchor-heading');
    for (var ai = 0; ai < anchors.length; ai++) anchors[ai].remove();
    tocItems.push({
      id: h.id,
      text: clone.textContent.trim(),
      level: h.tagName.toLowerCase()
    });
  }

  // Don't create side TOC if fewer than 3 headings
  if (tocItems.length < 3) return;

  // Build side TOC element
  var toc = document.createElement("nav");
  toc.className = "side-toc";
  toc.setAttribute("aria-label", "On this page");

  var title = document.createElement("p");
  title.className = "side-toc-title";
  // Detect language from html lang or page content
  var isEnglish = window.location.pathname.indexOf("/en/") !== -1;
  title.textContent = isEnglish ? "On This Page" : "本页目录";
  toc.appendChild(title);

  var ul = document.createElement("ul");
  for (var j = 0; j < tocItems.length; j++) {
    var item = tocItems[j];
    var li = document.createElement("li");
    if (item.level === "h3") {
      li.className = "toc-h3";
    }
    var a = document.createElement("a");
    a.href = "#" + item.id;
    a.textContent = item.text;
    a.setAttribute("title", item.text);
    li.appendChild(a);
    ul.appendChild(li);
  }
  toc.appendChild(ul);
  document.body.appendChild(toc);

  // Scroll spy — highlight the current section
  var tocLinks = toc.querySelectorAll("a");
  var headingElements = [];
  for (var k = 0; k < tocItems.length; k++) {
    headingElements.push(document.getElementById(tocItems[k].id));
  }

  function updateActiveLink() {
    var scrollPos = window.scrollY + 80; // offset for header
    var activeIndex = -1;

    for (var m = 0; m < headingElements.length; m++) {
      if (headingElements[m] && headingElements[m].offsetTop <= scrollPos) {
        activeIndex = m;
      }
    }

    for (var n = 0; n < tocLinks.length; n++) {
      tocLinks[n].classList.remove("active");
    }
    if (activeIndex >= 0 && tocLinks[activeIndex]) {
      tocLinks[activeIndex].classList.add("active");
      // Scroll the active link into view within the TOC if needed
      var activeEl = tocLinks[activeIndex];
      var tocRect = toc.getBoundingClientRect();
      var linkRect = activeEl.getBoundingClientRect();
      if (linkRect.top < tocRect.top || linkRect.bottom > tocRect.bottom) {
        activeEl.scrollIntoView({ block: "nearest", behavior: "smooth" });
      }
    }
  }

  // Throttle scroll handler
  var ticking = false;
  window.addEventListener("scroll", function() {
    if (!ticking) {
      requestAnimationFrame(function() {
        updateActiveLink();
        ticking = false;
      });
      ticking = true;
    }
  });

  // Initial highlight
  updateActiveLink();
});
</script>


</head>

<body>
  <a class="skip-to-main" href="#main-content">Skip to main content</a>
  <svg xmlns="http://www.w3.org/2000/svg" class="d-none">
  <symbol id="svg-link" viewBox="0 0 24 24">
  <title>Link</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
    <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
  </svg>
</symbol>

  <symbol id="svg-menu" viewBox="0 0 24 24">
  <title>Menu</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
    <line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
  </svg>
</symbol>

  <symbol id="svg-arrow-right" viewBox="0 0 24 24">
  <title>Expand</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
    <polyline points="9 18 15 12 9 6"></polyline>
  </svg>
</symbol>

  <!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
  <title id="svg-external-link-title">(external link)</title>
  <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
</symbol>

  
    <symbol id="svg-doc" viewBox="0 0 24 24">
  <title>Document</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
    <path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
  </svg>
</symbol>

    <symbol id="svg-search" viewBox="0 0 24 24">
  <title>Search</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
    <circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
  </svg>
</symbol>

  
  
    <!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
<symbol id="svg-copy" viewBox="0 0 16 16">
  <title>Copy</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
    <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
    <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
  </svg>
</symbol>
<symbol id="svg-copied" viewBox="0 0 16 16">
  <title>Copied</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
    <path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
    <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
  </svg>
</symbol>

  
</svg>

  
    <header class="side-bar">
  <div class="site-header">
    <a href="/peeka/" class="site-title lh-tight">
  <div class="site-logo" role="img" aria-label="Peeka"></div>
  <span class="site-title-text">Peeka</span>

</a>
    <button id="menu-button" class="site-button btn-reset" aria-label="Menu" aria-expanded="false">
      <svg viewBox="0 0 24 24" class="icon" aria-hidden="true"><use xlink:href="#svg-menu"></use></svg>
    </button>
  </div>

  <nav aria-label="Main" id="site-nav" class="site-nav">
  
  
    <ul class="nav-list"><li class="nav-list-item"><a href="/peeka/" class="nav-list-link">首页</a></li><li class="nav-list-item"><a href="/peeka/installation.html" class="nav-list-link">安装指南</a></li><li class="nav-list-item"><a href="/peeka/quickstart.html" class="nav-list-link">快速开始</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="命令参考 submenu" aria-expanded="false">
        <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg>
      </button><a href="/peeka/commands" class="nav-list-link">命令参考</a><ul class="nav-list"><li class="nav-list-item"><a href="/peeka/commands/attach.html" class="nav-list-link">attach</a></li><li class="nav-list-item"><a href="/peeka/commands/watch.html" class="nav-list-link">watch 命令</a></li><li class="nav-list-item"><a href="/peeka/commands/trace.html" class="nav-list-link">trace 命令</a></li><li class="nav-list-item"><a href="/peeka/commands/stack.html" class="nav-list-link">Peeka Stack 命令详解</a></li><li class="nav-list-item"><a href="/peeka/commands/monitor.html" class="nav-list-link">Peeka Monitor 命令详解</a></li><li class="nav-list-item"><a href="/peeka/commands/logger.html" class="nav-list-link">Peeka Logger 命令详解</a></li><li class="nav-list-item"><a href="/peeka/commands/memory.html" class="nav-list-link">memory 命令</a></li><li class="nav-list-item"><a href="/peeka/commands/inspect.html" class="nav-list-link">inspect 命令</a></li><li class="nav-list-item"><a href="/peeka/commands/search.html" class="nav-list-link">Peeka Search 命令详解（sc / sm）</a></li><li class="nav-list-item"><a href="/peeka/commands/reset.html" class="nav-list-link">reset 命令</a></li><li class="nav-list-item"><a href="/peeka/commands/thread.html" class="nav-list-link">thread 命令</a></li><li class="nav-list-item"><a href="/peeka/commands/top.html" class="nav-list-link">top 命令</a></li><li class="nav-list-item"><a href="/peeka/commands/detach.html" class="nav-list-link">detach 命令</a></li></ul></li><li class="nav-list-item"><a href="/peeka/examples.html" class="nav-list-link">示例教程</a></li><li class="nav-list-item"><a href="/peeka/tui.html" class="nav-list-link">TUI 使用指南</a></li><li class="nav-list-item"><a href="/peeka/ai-skill.html" class="nav-list-link">AI 智能体技能</a></li><li class="nav-list-item"><a href="/peeka/architecture.html" class="nav-list-link">架构设计</a></li><li class="nav-list-item"><a href="/peeka/troubleshooting.html" class="nav-list-link">故障排除</a></li></ul>
  
</nav>


<div class="d-md-block d-none site-footer">
  
  
    This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
  
  </div>
</header>

  
  <div class="main" id="top">
    <div id="main-header" class="main-header">
  
    

<div class="search" role="search">
  <div class="search-input-wrap">
    <input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search Peeka" autocomplete="off">
    <label for="search-input" class="search-label">
      <span class="sr-only">Search Peeka</span>
      <svg viewBox="0 0 24 24" class="search-icon" aria-hidden="true"><use xlink:href="#svg-search"></use></svg>
    </label>
  </div>
  <div id="search-results" class="search-results"></div>
</div>

  
  
  
    <nav aria-label="Auxiliary" class="aux-nav">
  <ul class="aux-nav-list">
    
      <li class="aux-nav-list-item">
        <a href="/peeka/en/" class="site-button"
          
        >
          English
        </a>
      </li>
    
      <li class="aux-nav-list-item">
        <a href="https://github.com/wwulfric/peeka" class="site-button"
          
        >
          GitHub
        </a>
      </li>
    
  </ul>
</nav>

  
</div>

    <div class="main-content-wrap">
      
      <div id="main-content" class="main-content">
        <main>
          
            <h.site-nav ul li a {
  background-image: linear-gradient(-90deg, rgb(234.8, 236.82, 244.9) 0%, rgba(234.8, 236.82, 244.9, 0.8) 80%, rgba(234.8, 236.82, 244.9, 0) 100%);
}

          

          
            
          
        </main>
        
<hr>
<footer>
  
    <p><a href="#top" id="back-to-top">回到顶部</a></p>
  

  <p class="text-small mb-0">Copyright &copy; 2026 Peeka. Distributed under the MIT License.</p>


  <div class="d-md-none mt-4 fs-2">
    
    
      This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
    
  </div>
</footer>

      </div>
    </div>
    
      

<div class="search-overlay"></div>

    
  </div>

  
</body>
</html>

