{"id":1077077,"date":"2025-01-08T11:58:57","date_gmt":"2025-01-08T03:58:57","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1077077.html"},"modified":"2025-01-08T11:59:00","modified_gmt":"2025-01-08T03:59:00","slug":"python%e8%87%aa%e8%ba%ab%e7%9a%84%e7%bc%96%e8%be%91%e5%99%a8%e5%a6%82%e4%bd%95%e8%b0%83%e8%af%95-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1077077.html","title":{"rendered":"python\u81ea\u8eab\u7684\u7f16\u8f91\u5668\u5982\u4f55\u8c03\u8bd5"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24181327\/662fb650-f421-4e6e-a05d-104aa16f814f.webp\" alt=\"python\u81ea\u8eab\u7684\u7f16\u8f91\u5668\u5982\u4f55\u8c03\u8bd5\" \/><\/p>\n<p><p> <strong>Python\u81ea\u8eab\u7684\u7f16\u8f91\u5668\u5982\u4f55\u8c03\u8bd5\uff1a\u4f7f\u7528\u5185\u7f6e\u8c03\u8bd5\u5668\uff08pdb\uff09\u3001\u4f7f\u7528\u65ad\u70b9\uff08breakpoints\uff09\u3001\u4f7f\u7528print\u8bed\u53e5<\/strong><\/p>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u8c03\u8bd5\u5de5\u5177\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u5305\u62ec<strong>\u4f7f\u7528\u5185\u7f6e\u8c03\u8bd5\u5668\uff08pdb\uff09<\/strong>\u3001<strong>\u4f7f\u7528\u65ad\u70b9\uff08breakpoints\uff09<\/strong>\u548c<strong>\u4f7f\u7528print\u8bed\u53e5<\/strong>\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5404\u6709\u4f18\u70b9\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u4f7f\u7528\u5185\u7f6e\u8c03\u8bd5\u5668\uff08pdb\uff09\u8fdb\u884c\u8c03\u8bd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u5185\u7f6e\u8c03\u8bd5\u5668\uff08pdb\uff09<\/h3>\n<\/p>\n<p><p>Python\u7684\u5185\u7f6e\u8c03\u8bd5\u5668pdb\uff08Python Debugger\uff09\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u8c03\u8bd5\u5de5\u5177\u3002\u5b83\u5141\u8bb8\u4f60\u9010\u884c\u6267\u884c\u4ee3\u7801\uff0c\u67e5\u770b\u53d8\u91cf\u7684\u503c\uff0c\u8bbe\u7f6e\u65ad\u70b9\u7b49\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528pdb\u8fdb\u884c\u8c03\u8bd5\u7684\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><h4>1\u3001\u542f\u52a8pdb\u8c03\u8bd5\u5668<\/h4>\n<\/p>\n<p><p>\u5728\u4f60\u7684Python\u4ee3\u7801\u4e2d\u63d2\u5165\u4ee5\u4e0b\u4ee3\u7801\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pdb; pdb.set_trace()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u884c\u4ee3\u7801\u4f1a\u5728\u6267\u884c\u5230\u6b64\u5904\u65f6\u6682\u505c\u7a0b\u5e8f\uff0c\u5e76\u542f\u52a8pdb\u8c03\u8bd5\u5668\u3002\u4f60\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u6267\u884c\u8c03\u8bd5\u547d\u4ee4\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u5e38\u7528pdb\u547d\u4ee4<\/h4>\n<\/p>\n<ul>\n<li><code>n<\/code> (next)\uff1a\u6267\u884c\u4e0b\u4e00\u884c\u4ee3\u7801\u3002<\/li>\n<li><code>s<\/code> (step)\uff1a\u8fdb\u5165\u51fd\u6570\u5185\u90e8\u3002<\/li>\n<li><code>c<\/code> (continue)\uff1a\u7ee7\u7eed\u6267\u884c\u7a0b\u5e8f\u76f4\u5230\u4e0b\u4e00\u4e2a\u65ad\u70b9\u3002<\/li>\n<li><code>q<\/code> (quit)\uff1a\u9000\u51fa\u8c03\u8bd5\u5668\u3002<\/li>\n<li><code>p<\/code> (print)\uff1a\u6253\u5370\u53d8\u91cf\u7684\u503c\uff0c\u4f8b\u5982 <code>p variable_name<\/code>\u3002<\/li>\n<li><code>l<\/code> (list)\uff1a\u663e\u793a\u5f53\u524d\u884c\u9644\u8fd1\u7684\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u65ad\u70b9\uff08breakpoints\uff09<\/h3>\n<\/p>\n<p><p>\u65ad\u70b9\u662f\u8c03\u8bd5\u8fc7\u7a0b\u4e2d\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u5de5\u5177\u3002\u4f60\u53ef\u4ee5\u5728IDE\uff08\u5982PyCharm\u3001VSCode\uff09\u6216\u4f7f\u7528Python\u5185\u7f6e\u7684<code>breakpoint()<\/code>\u51fd\u6570\u8bbe\u7f6e\u65ad\u70b9\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5728IDE\u4e2d\u8bbe\u7f6e\u65ad\u70b9<\/h4>\n<\/p>\n<p><p>\u5927\u591a\u6570\u73b0\u4ee3IDE\u90fd\u652f\u6301\u65ad\u70b9\u8c03\u8bd5\u3002\u4f60\u53ea\u9700\u5728\u4ee3\u7801\u884c\u5de6\u4fa7\u70b9\u51fb\u4e00\u4e0b\uff0c\u5373\u53ef\u8bbe\u7f6e\u65ad\u70b9\u3002\u7136\u540e\uff0c\u8fd0\u884c\u8c03\u8bd5\u6a21\u5f0f\uff0c\u7a0b\u5e8f\u4f1a\u5728\u65ad\u70b9\u5904\u6682\u505c\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528<code>breakpoint()<\/code>\u51fd\u6570<\/h4>\n<\/p>\n<p><p>Python 3.7\u53ca\u4ee5\u4e0a\u7248\u672c\u63d0\u4f9b\u4e86<code>breakpoint()<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u63d2\u5165\u4ee5\u4e0b\u884c\u6765\u8bbe\u7f6e\u65ad\u70b9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">breakpoint()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5f53\u7a0b\u5e8f\u6267\u884c\u5230\u6b64\u5904\u65f6\uff0c\u4f1a\u6682\u505c\u5e76\u8fdb\u5165\u8c03\u8bd5\u6a21\u5f0f\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528print\u8bed\u53e5<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528print\u8bed\u53e5\u662f\u6700\u7b80\u5355\u7684\u8c03\u8bd5\u65b9\u6cd5\u3002\u4f60\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u63d2\u5165print\u8bed\u53e5\uff0c\u6253\u5370\u53d8\u91cf\u7684\u503c\u6216\u6267\u884c\u5230\u67d0\u4e00\u884c\u4ee3\u7801\u65f6\u7684\u72b6\u6001\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u63d2\u5165print\u8bed\u53e5<\/h4>\n<\/p>\n<p><p>\u5728\u4f60\u7684\u4ee3\u7801\u4e2d\u63d2\u5165\u4ee5\u4e0b\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;\u53d8\u91cf\u7684\u503c\u662f\uff1a&quot;, variable_name)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6837\uff0c\u4f60\u53ef\u4ee5\u5728\u7ec8\u7aef\u6216\u63a7\u5236\u53f0\u4e2d\u67e5\u770b\u53d8\u91cf\u7684\u503c\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u8c03\u8bd5\u590d\u6742\u903b\u8f91<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u590d\u6742\u7684\u903b\u8f91\uff0c\u53ef\u4ee5\u5728\u4ee3\u7801\u7684\u5173\u952e\u4f4d\u7f6e\u63d2\u5165\u591a\u4e2aprint\u8bed\u53e5\uff0c\u9010\u6b65\u8ffd\u8e2a\u7a0b\u5e8f\u7684\u6267\u884c\u6d41\u7a0b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;\u6267\u884c\u5230\u51fd\u6570\u5f00\u59cb&quot;)<\/p>\n<h2><strong>\u4ee3\u7801<\/strong><\/h2>\n<p>print(&quot;\u6267\u884c\u5230\u4e2d\u95f4\u90e8\u5206&quot;)<\/p>\n<h2><strong>\u4ee3\u7801<\/strong><\/h2>\n<p>print(&quot;\u6267\u884c\u5230\u51fd\u6570\u7ed3\u675f&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u7efc\u5408\u4f7f\u7528\u591a\u79cd\u8c03\u8bd5\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u8c03\u8bd5\u8fc7\u7a0b\u4e2d\uff0c\u5f80\u5f80\u9700\u8981\u7efc\u5408\u4f7f\u7528\u591a\u79cd\u8c03\u8bd5\u65b9\u6cd5\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u5148\u4f7f\u7528print\u8bed\u53e5\u5feb\u901f\u5b9a\u4f4d\u95ee\u9898\uff0c\u7136\u540e\u4f7f\u7528pdb\u6216\u65ad\u70b9\u8fdb\u884c\u66f4\u8be6\u7ec6\u7684\u8c03\u8bd5\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u6848\u4f8b\u5206\u6790<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u4f60\u6709\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def factorial(n):<\/p>\n<p>    if n == 0:<\/p>\n<p>        return 1<\/p>\n<p>    else:<\/p>\n<p>        return n * factorial(n - 1)<\/p>\n<p>result = factorial(5)<\/p>\n<p>print(&quot;\u7ed3\u679c\u662f\uff1a&quot;, result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8c03\u8bd5\u65f6\uff0c\u4f60\u53d1\u73b0\u7ed3\u679c\u4e0d\u6b63\u786e\uff0c\u53ef\u4ee5\u5148\u63d2\u5165print\u8bed\u53e5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def factorial(n):<\/p>\n<p>    print(&quot;n\u7684\u503c\u662f\uff1a&quot;, n)  # \u8c03\u8bd5\u4fe1\u606f<\/p>\n<p>    if n == 0:<\/p>\n<p>        return 1<\/p>\n<p>    else:<\/p>\n<p>        return n * factorial(n - 1)<\/p>\n<p>result = factorial(5)<\/p>\n<p>print(&quot;\u7ed3\u679c\u662f\uff1a&quot;, result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u95ee\u9898\u4ecd\u672a\u89e3\u51b3\uff0c\u53ef\u4ee5\u4f7f\u7528pdb\u8fdb\u884c\u66f4\u6df1\u5165\u7684\u8c03\u8bd5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pdb<\/p>\n<p>def factorial(n):<\/p>\n<p>    pdb.set_trace()  # \u542f\u52a8\u8c03\u8bd5\u5668<\/p>\n<p>    if n == 0:<\/p>\n<p>        return 1<\/p>\n<p>    else:<\/p>\n<p>        return n * factorial(n - 1)<\/p>\n<p>result = factorial(5)<\/p>\n<p>print(&quot;\u7ed3\u679c\u662f\uff1a&quot;, result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u8c03\u8bd5\u6280\u5de7\u548c\u6700\u4f73\u5b9e\u8df5<\/h3>\n<\/p>\n<p><h4>1\u3001\u9010\u6b65\u8c03\u8bd5<\/h4>\n<\/p>\n<p><p>\u9010\u6b65\u8c03\u8bd5\u662f\u5b9a\u4f4d\u95ee\u9898\u7684\u6709\u6548\u65b9\u6cd5\u3002\u901a\u8fc7\u9010\u884c\u6267\u884c\u4ee3\u7801\uff0c\u4f60\u53ef\u4ee5\u51c6\u786e\u627e\u5230\u95ee\u9898\u6240\u5728\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u67e5\u770b\u53d8\u91cf\u503c<\/h4>\n<\/p>\n<p><p>\u5728\u8c03\u8bd5\u8fc7\u7a0b\u4e2d\uff0c\u9891\u7e41\u67e5\u770b\u53d8\u91cf\u7684\u503c\u662f\u5f88\u6709\u5fc5\u8981\u7684\u3002\u8fd9\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7406\u89e3\u7a0b\u5e8f\u7684\u8fd0\u884c\u72b6\u6001\u3002<\/p>\n<\/p>\n<p><h4>3\u3001\u8bbe\u7f6e\u6761\u4ef6\u65ad\u70b9<\/h4>\n<\/p>\n<p><p>\u6709\u65f6\u4f60\u53ea\u5e0c\u671b\u5728\u7279\u5b9a\u6761\u4ef6\u4e0b\u6682\u505c\u7a0b\u5e8f\u3002\u53ef\u4ee5\u4f7f\u7528\u6761\u4ef6\u65ad\u70b9\uff0c\u4f8b\u5982\u5728IDE\u4e2d\u53f3\u952e\u70b9\u51fb\u65ad\u70b9\uff0c\u8bbe\u7f6e\u6761\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>4\u3001\u4f7f\u7528\u65e5\u5fd7\u8bb0\u5f55<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u590d\u6742\u7a0b\u5e8f\uff0c\u5efa\u8bae\u4f7f\u7528\u65e5\u5fd7\u8bb0\u5f55\uff08logging\uff09\u800c\u4e0d\u662fprint\u8bed\u53e5\u3002\u65e5\u5fd7\u8bb0\u5f55\u53ef\u4ee5\u4fdd\u5b58\u8c03\u8bd5\u4fe1\u606f\uff0c\u65b9\u4fbf\u540e\u7eed\u5206\u6790\u3002<\/p>\n<\/p>\n<p><h4>5\u3001\u8c03\u8bd5\u591a\u7ebf\u7a0b\u7a0b\u5e8f<\/h4>\n<\/p>\n<p><p>\u8c03\u8bd5\u591a\u7ebf\u7a0b\u7a0b\u5e8f\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u66f4\u591a\u6311\u6218\u3002\u53ef\u4ee5\u4f7f\u7528\u4e13\u95e8\u7684\u591a\u7ebf\u7a0b\u8c03\u8bd5\u5de5\u5177\u6216\u6280\u5de7\uff0c\u4f8b\u5982\u5728\u6bcf\u4e2a\u7ebf\u7a0b\u4e2d\u8bbe\u7f6e\u72ec\u7acb\u7684\u65ad\u70b9\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u8c03\u8bd5\u5de5\u5177\uff0c<strong>\u5185\u7f6e\u8c03\u8bd5\u5668\uff08pdb\uff09<\/strong>\u3001<strong>\u65ad\u70b9\uff08breakpoints\uff09<\/strong>\u548c<strong>print\u8bed\u53e5<\/strong>\u662f\u5176\u4e2d\u6700\u5e38\u7528\u7684\u4e09\u79cd\u65b9\u6cd5\u3002\u901a\u8fc7\u5408\u7406\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\uff0c\u4f60\u53ef\u4ee5\u9ad8\u6548\u5730\u5b9a\u4f4d\u548c\u89e3\u51b3\u7a0b\u5e8f\u4e2d\u7684\u95ee\u9898\u3002\u6b64\u5916\uff0c\u9010\u6b65\u8c03\u8bd5\u3001\u67e5\u770b\u53d8\u91cf\u503c\u3001\u8bbe\u7f6e\u6761\u4ef6\u65ad\u70b9\u548c\u4f7f\u7528\u65e5\u5fd7\u8bb0\u5f55\u7b49\u6280\u5de7\u4e5f\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u8fdb\u884c\u8c03\u8bd5\u3002\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u638c\u63e1Python\u8c03\u8bd5\u6280\u5de7\uff0c\u63d0\u9ad8\u7f16\u7801\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u7f16\u8f91\u5668\u4e2d\u8bbe\u7f6e\u8c03\u8bd5\u73af\u5883\uff1f<\/strong><br \/>\u5728Python\u7684\u7f16\u8f91\u5668\u4e2d\u8bbe\u7f6e\u8c03\u8bd5\u73af\u5883\u901a\u5e38\u5305\u62ec\u5b89\u88c5\u8c03\u8bd5\u5de5\u5177\u6216\u4f7f\u7528\u5185\u7f6e\u7684\u8c03\u8bd5\u5668\u3002\u5e38\u89c1\u7684\u7f16\u8f91\u5668\u5982PyCharm\u3001VS Code\u548cIDLE\u90fd\u63d0\u4f9b\u4e86\u8c03\u8bd5\u529f\u80fd\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u9879\u76ee\u8bbe\u7f6e\uff0c\u9009\u62e9Python\u89e3\u91ca\u5668\uff0c\u5e76\u8bbe\u7f6e\u65ad\u70b9\u6765\u5f00\u59cb\u8c03\u8bd5\u3002\u786e\u4fdd\u4f60\u719f\u6089\u7f16\u8f91\u5668\u7684\u754c\u9762\uff0c\u4ee5\u4fbf\u9ad8\u6548\u5229\u7528\u8c03\u8bd5\u529f\u80fd\u3002<\/p>\n<p><strong>\u5728Python\u7f16\u8f91\u5668\u4e2d\u8c03\u8bd5\u4ee3\u7801\u65f6\uff0c\u5982\u4f55\u4f7f\u7528\u65ad\u70b9\uff1f<\/strong><br \/>\u4f7f\u7528\u65ad\u70b9\u662f\u8c03\u8bd5\u8fc7\u7a0b\u4e2d\u7684\u5173\u952e\u6b65\u9aa4\u3002\u5728\u5927\u591a\u6570Python\u7f16\u8f91\u5668\u4e2d\uff0c\u7528\u6237\u53ea\u9700\u70b9\u51fb\u884c\u53f7\u65c1\u7684\u7a7a\u767d\u533a\u57df\u6216\u53f3\u952e\u9009\u62e9\u201c\u6dfb\u52a0\u65ad\u70b9\u201d\u5373\u53ef\u8bbe\u7f6e\u65ad\u70b9\u3002\u5f53\u4ee3\u7801\u6267\u884c\u5230\u65ad\u70b9\u65f6\uff0c\u4f1a\u6682\u505c\u8fd0\u884c\uff0c\u5141\u8bb8\u7528\u6237\u68c0\u67e5\u53d8\u91cf\u503c\u3001\u8c03\u7528\u5806\u6808\u7b49\u4fe1\u606f\u3002\u8fd9\u5bf9\u4e8e\u5b9a\u4f4d\u95ee\u9898\u548c\u7406\u89e3\u4ee3\u7801\u8fd0\u884c\u6d41\u7a0b\u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u8c03\u8bd5\u4e2d\u67e5\u770b\u53d8\u91cf\u7684\u5f53\u524d\u503c\uff1f<\/strong><br \/>\u5728\u8c03\u8bd5\u8fc7\u7a0b\u4e2d\uff0c\u67e5\u770b\u53d8\u91cf\u7684\u5f53\u524d\u503c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u4e86\u89e3\u4ee3\u7801\u7684\u6267\u884c\u72b6\u6001\u3002\u5927\u591a\u6570Python\u7f16\u8f91\u5668\u4f1a\u5728\u8c03\u8bd5\u89c6\u56fe\u4e2d\u63d0\u4f9b\u53d8\u91cf\u76d1\u89c6\u7a97\u53e3\u3002\u5728\u8fd0\u884c\u5230\u65ad\u70b9\u65f6\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u8be5\u7a97\u53e3\u4e2d\u67e5\u770b\u548c\u4fee\u6539\u53d8\u91cf\u7684\u503c\uff0c\u4ece\u800c\u6df1\u5165\u5206\u6790\u7a0b\u5e8f\u7684\u884c\u4e3a\u3002\u8fd9\u79cd\u5b9e\u65f6\u53cd\u9988\u662f\u8c03\u8bd5\u4e2d\u975e\u5e38\u5b9e\u7528\u7684\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u81ea\u8eab\u7684\u7f16\u8f91\u5668\u5982\u4f55\u8c03\u8bd5\uff1a\u4f7f\u7528\u5185\u7f6e\u8c03\u8bd5\u5668\uff08pdb\uff09\u3001\u4f7f\u7528\u65ad\u70b9\uff08breakpoints\uff09\u3001\u4f7f\u7528print [&hellip;]","protected":false},"author":3,"featured_media":1077083,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1077077"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1077077"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1077077\/revisions"}],"predecessor-version":[{"id":1077086,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1077077\/revisions\/1077086"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1077083"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1077077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1077077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1077077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}