{"id":113381,"date":"2026-10-06T07:56:52","date_gmt":"2026-10-05T23:56:52","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/113381.html"},"modified":"2026-10-06T07:56:52","modified_gmt":"2026-10-05T23:56:52","slug":"%e8%af%ad%e8%a8%80%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%8d%8f%e8%ae%ae-settrace-%e9%80%9a%e7%9f%a5%e8%af%a6%e8%a7%a3%ef%bc%9a%e6%9c%8d%e5%8a%a1%e7%ab%af-trace-%e7%ba%a7%e5%88%ab%e7%9a%84%e5%8a%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/113381.html","title":{"rendered":"\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae `$\/setTrace` \u901a\u77e5\u8be6\u89e3\uff1a\u670d\u52a1\u7aef Trace \u7ea7\u522b\u7684\u52a8\u6001\u8c03\u6574\u673a\u5236"},"content":{"rendered":"<ul class=\"gcb-tag-list\">\n<li><span class=\"gcb-tag\">\u5f00\u53d1\u5de5\u5177<\/span><\/li>\n<\/ul>\n<h3 class=\"gcb-project-title\">\u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011language-server-protocol<\/h3>\n<p class=\"gcb-project-desc\">Defines a common protocol for language servers.<\/p>\n<p>    <span class=\"gcb-project-addr-label\">\u9879\u76ee\u5730\u5740&#xff1a;<\/span><br \/>\n    <span class=\"gcb-project-addr-link\">https:\/\/gitcode.com\/gh_mirrors\/la\/language-server-protocol<\/span> <\/p>\n<p>  <span class=\"gcb-project-btn\"> <span class=\"gcb-project-btn-main\">\u70b9\u51fb\u67e5\u770b<\/span> <span class=\"gcb-project-btn-sub\">\u514d\u8d39\u4e0b\u8f7d<\/span> <\/span> <\/p>\n<p>\u5728\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae&#xff08;LSP&#xff09;\u7684\u670d\u52a1\u5668\u751f\u547d\u5468\u671f\u6d88\u606f\u4e2d&#xff0c;$\/setTrace \u662f\u5ba2\u6237\u7aef\u7528\u4e8e\u52a8\u6001\u4fee\u6539\u8bed\u8a00\u670d\u52a1\u5668 trace \u8bbe\u7f6e\u7684\u6838\u5fc3\u901a\u77e5\u3002\u672c\u6587\u4ee5\u672c\u4ed3\u5e93 3.18 \u7248 setTrace \u6587\u6863 \u4e3a\u4e3b\u5e72&#xff0c;\u7ed3\u5408 TraceValue \u7c7b\u578b\u5b9a\u4e49\u3001\u914d\u5bf9\u7684 $\/logTrace \u901a\u77e5 \u4e0e \u673a\u5668\u53ef\u8bfb\u5143\u6a21\u578b \u6e90\u7801&#xff0c;\u5b8c\u6574\u8bb2\u89e3\u8be5\u901a\u77e5\u7684\u62a5\u6587\u7ed3\u6784\u3001\u53d6\u503c\u8bed\u4e49\u3001\u751f\u547d\u5468\u671f\u65f6\u673a\u4ee5\u53ca\u5b9e\u73b0\u8981\u70b9\u3002\u8bfb\u5b8c\u672c\u6587&#xff0c;\u4f60\u5c06\u638c\u63e1\u5982\u4f55\u5728\u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u7aef\u4e24\u4fa7\u6b63\u786e\u5b9e\u73b0 trace \u7ea7\u522b\u7684\u4e0b\u53d1\u3001\u63a5\u6536\u4e0e\u914d\u5957\u7684\u6267\u884c\u8f68\u8ff9\u4e0a\u62a5\u3002<\/p>\n<h3>$\/setTrace \u901a\u77e5\u7684\u5b9a\u4f4d\u4e0e\u62a5\u6587\u7ed3\u6784<\/h3>\n<p>$\/setTrace \u662f\u4e00\u6761 \u7531\u5ba2\u6237\u7aef\u53d1\u9001\u7ed9\u670d\u52a1\u5668&#xff08;client \u2192 server&#xff09;\u7684 notification&#xff08;\u7bad\u5934 (:arrow_right:) \u5373\u8868\u793a\u6d88\u606f\u65b9\u5411\u4e3a\u5ba2\u6237\u7aef\u6307\u5411\u670d\u52a1\u5668&#xff09;\u3002\u5176\u534f\u8bae\u610f\u56fe\u5728\u539f\u6587\u4e2d\u5b9a\u4e49\u5f97\u975e\u5e38\u660e\u786e&#xff1a;<\/p>\n<p>A notification that should be used by the client to modify the trace setting of the server.<\/p>\n<p>\u5373&#xff1a;\u8be5\u901a\u77e5\u7684\u552f\u4e00\u7528\u9014\u662f\u8ba9\u5ba2\u6237\u7aef\u4fee\u6539\u670d\u52a1\u5668\u5f53\u524d\u7684 trace \u8bbe\u7f6e\u3002\u5b83\u4e0e\u8bf7\u6c42&#xff08;request&#xff09;\u4e0d\u540c&#xff0c;\u4e0d\u9700\u8981\u670d\u52a1\u5668\u8fd4\u56de\u54cd\u5e94&#xff0c;\u5c5e\u4e8e\u5355\u5411\u7684\u3001\u5c3d\u529b\u800c\u4e3a\u7684\u901a\u77e5\u7c7b\u578b\u3002<\/p>\n<h4>method \u4e0e params<\/h4>\n<p>\u6839\u636e _includes\/messages\/3.18\/setTrace.md \u7684\u89c4\u8303\u5b9a\u4e49&#xff1a;<\/p>\n<ul>\n<li>method&#xff1a;&#039;$\/setTrace&#039;&#xff08;$ \u524d\u7f00\u8868\u793a\u8fd9\u662f\u534f\u8bae\u6846\u67b6\u7ea7\u522b\u7684\u5185\u5efa\u6d88\u606f&#xff0c;\u800c\u975e\u67d0\u4e2a\u8bed\u8a00\u7279\u6027\u4e13\u5c5e\u8bf7\u6c42&#xff09;<\/li>\n<li>params&#xff1a;SetTraceParams&#xff0c;\u5176 TypeScript \u5b9a\u4e49\u5982\u4e0b&#xff1a;<\/li>\n<\/ul>\n<p>interface SetTraceParams {<br \/>\n\/**<br \/>\n * The new value that should be assigned to the trace setting.<br \/>\n *\/<br \/>\nvalue: TraceValue;<br \/>\n}<\/p>\n<p>\u53c2\u6570\u7ed3\u6784\u975e\u5e38\u7cbe\u7b80&#xff0c;\u4ec5\u5305\u542b\u4e00\u4e2a\u5fc5\u586b\u5b57\u6bb5 value&#xff0c;\u7528\u4e8e\u627f\u8f7d\u5c06\u8981\u8d4b\u503c\u7ed9\u670d\u52a1\u5668 trace \u8bbe\u7f6e\u7684\u65b0\u503c\u3002<\/p>\n<h4>\u5178\u578b JSON \u62a5\u6587\u793a\u4f8b<\/h4>\n<p>\u57fa\u4e8e\u4e0a\u8ff0\u7ed3\u6784&#xff0c;\u4e00\u4e2a\u5b9e\u9645\u901a\u8fc7\u6807\u51c6 LSP \u6d88\u606f\u5e27\u4f20\u8f93\u7684 $\/setTrace \u901a\u77e5\u5728 wire \u683c\u5f0f\u4e0a\u5927\u81f4\u5982\u4e0b&#xff08;JSON-RPC \u5916\u5c42\u4fe1\u5c01\u6309 2.0 \u7ea6\u5b9a&#xff09;&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;jsonrpc&#034;: &#034;2.0&#034;,<br \/>\n  &#034;method&#034;: &#034;$\/setTrace&#034;,<br \/>\n  &#034;params&#034;: {<br \/>\n    &#034;value&#034;: &#034;verbose&#034;<br \/>\n  }<br \/>\n}<\/p>\n<p>\u5176\u4e2d value \u53ef\u4ee5\u662f\u4e0b\u6587\u4ecb\u7ecd\u7684\u4e09\u79cd TraceValue \u679a\u4e3e\u503c\u4e4b\u4e00\u3002<\/p>\n<h3>TraceValue&#xff1a;trace \u7ea7\u522b\u7684\u4e09\u6863\u53d6\u503c\u8bed\u4e49<\/h3>\n<p>TraceValue \u662f SetTraceParams.value \u7684\u7c7b\u578b\u6765\u6e90&#xff0c;\u5b9a\u4e49\u4e8e _includes\/types\/traceValue.md&#xff1a;<\/p>\n<p>export type TraceValue &#061; &#039;off&#039; | &#039;messages&#039; | &#039;verbose&#039;;<\/p>\n<p>\u5176\u8bed\u4e49\u5728\u672c\u4ed3\u5e93\u6587\u6863\u4e2d\u8868\u8ff0\u4e3a&#xff1a;TraceValue \u8868\u793a\u670d\u52a1\u5668\u901a\u8fc7 $\/logTrace \u901a\u77e5\u7cfb\u7edf\u6027\u4e0a\u62a5\u5176\u6267\u884c\u8f68\u8ff9\u65f6\u7684\u8be6\u7ec6\u7a0b\u5ea6&#xff08;verbosity&#xff09;\u7ea7\u522b\u3002\u4e09\u4e2a\u53d6\u503c\u5bf9\u5e94\u4e09\u7ea7\u5f00\u5173&#xff1a;<\/p>\n<table>\n<tr>\u53d6\u503c\u542b\u4e49\u5bf9 $\/logTrace \u884c\u4e3a\u7684\u5f71\u54cd<\/tr>\n<tbody>\n<tr>\n<td>&#039;off&#039;<\/td>\n<td>\u5173\u95ed trace<\/td>\n<td>\u670d\u52a1\u5668\u4e0d\u5e94\u53d1\u9001\u4efb\u4f55 $\/logTrace \u901a\u77e5<\/td>\n<\/tr>\n<tr>\n<td>&#039;messages&#039;<\/td>\n<td>\u4ec5\u4e0a\u62a5\u6d88\u606f\u7ea7\u8f68\u8ff9<\/td>\n<td>\u53d1\u9001 $\/logTrace&#xff0c;\u4f46 LogTraceParams \u4e2d\u4e0d\u5e94\u643a\u5e26 verbose \u5b57\u6bb5<\/td>\n<\/tr>\n<tr>\n<td>&#039;verbose&#039;<\/td>\n<td>\u8be6\u7ec6\u8f68\u8ff9<\/td>\n<td>\u53d1\u9001 $\/logTrace&#xff0c;\u4e14\u53ef\u643a\u5e26 verbose \u9644\u52a0\u4fe1\u606f\u5b57\u6bb5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8be5\u679a\u4e3e\u5728 \u5143\u6a21\u578b metaModel.json \u4e2d\u7684 TraceValue \u5b9a\u4e49 \u91cc\u88ab\u63cf\u8ff0\u4e3a\u4e09\u4e2a\u5b57\u7b26\u4e32\u5b57\u9762\u91cf\u503c&#xff0c;\u5b98\u65b9\u8bf4\u660e\u5206\u522b\u4e3a&#xff1a;<\/p>\n<ul>\n<li>off&#xff1a;Turn tracing off&#xff08;\u5173\u95ed\u8ffd\u8e2a&#xff09;<\/li>\n<li>messages&#xff1a;Trace messages only&#xff08;\u4ec5\u8ffd\u8e2a\u6d88\u606f&#xff09;<\/li>\n<li>verbose&#xff1a;Verbose message tracing&#xff08;\u8ffd\u8e2a\u8be6\u7ec6\u6d88\u606f&#xff09;<\/li>\n<\/ul>\n<p>\u4e09\u4e2a\u53d6\u503c\u7684\u7c92\u5ea6\u81ea\u4f4e\u5230\u9ad8&#xff0c;\u6784\u6210\u4e00\u4e2a\u9012\u589e\u7684&#034;\u8be6\u7ec6\u7a0b\u5ea6&#034;\u9636\u68af&#xff0c;\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u8fd0\u884c\u671f\u6309\u9700\u4e0a\u4e0b\u8c03\u6574\u3002<\/p>\n<h3>\u4e0e $\/logTrace \u7684\u914d\u5bf9\u8054\u52a8&#xff1a;trace \u7684\u6d88\u8d39\u7aef<\/h3>\n<p>$\/setTrace \u8d1f\u8d23&#034;\u4e0b\u53d1\u8bbe\u7f6e&#034;&#xff0c;\u771f\u6b63&#034;\u6d88\u8d39&#034;\u8be5\u8bbe\u7f6e\u7684\u662f\u670d\u52a1\u5668 \u2192 \u5ba2\u6237\u7aef\u65b9\u5411\u7684 $\/logTrace \u901a\u77e5&#xff08;_includes\/messages\/3.18\/logTrace.md&#xff09;\u3002\u4e24\u6761\u6d88\u606f\u65b9\u5411\u76f8\u53cd\u3001\u8bed\u4e49\u4e92\u8865&#xff0c;\u5171\u540c\u6784\u6210 LSP \u7684\u6267\u884c\u8f68\u8ff9&#xff08;trace&#xff09;\u4e0a\u62a5\u901a\u9053&#xff1a;<\/p>\n<table>\n<tr>\u7ef4\u5ea6$\/setTrace$\/logTrace<\/tr>\n<tbody>\n<tr>\n<td>\u65b9\u5411<\/td>\n<td>client \u2192 server<\/td>\n<td>server \u2192 client<\/td>\n<\/tr>\n<tr>\n<td>\u4f5c\u7528<\/td>\n<td>\u4fee\u6539\u670d\u52a1\u5668 trace \u8bbe\u7f6e<\/td>\n<td>\u4e0a\u62a5\u670d\u52a1\u5668\u6267\u884c\u8f68\u8ff9<\/td>\n<\/tr>\n<tr>\n<td>\u65f6\u673a<\/td>\n<td>\u751f\u547d\u5468\u671f\u5185\u4efb\u610f\u65f6\u523b&#xff08;\u521d\u59cb\u5316\u540e&#xff09;<\/td>\n<td>\u6309\u5f53\u524d trace \u7ea7\u522b\u51b3\u5b9a\u662f\u5426\u53d1\u9001<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>LogTraceParams \u7684\u7ed3\u6784\u5982\u4e0b&#xff1a;<\/p>\n<p>interface LogTraceParams {<br \/>\n\/**<br \/>\n * The message to be logged.<br \/>\n *\/<br \/>\nmessage: string;<br \/>\n\/**<br \/>\n * Additional information that can be computed if the &#096;trace&#096; configuration<br \/>\n * is set to &#096;&#039;verbose&#039;&#096;.<br \/>\n *\/<br \/>\nverbose?: string;<br \/>\n}<\/p>\n<p>\u89c4\u8303\u5bf9\u4e8c\u8005\u8054\u52a8\u5173\u7cfb\u7684\u7ea6\u675f\u53ef\u4ee5\u5f52\u7eb3\u4e3a\u4e09\u6761&#xff1a;<\/p>\n<li>&#039;off&#039; \u9759\u9ed8&#xff1a;\u5f53 trace \u4e3a &#039;off&#039; \u65f6&#xff0c;\u670d\u52a1\u5668\u4e0d\u5f97\u53d1\u9001\u4efb\u4f55 $\/logTrace \u901a\u77e5&#xff1b;<\/li>\n<li>&#039;messages&#039; \u7cbe\u7b80&#xff1a;\u5f53 trace \u4e3a &#039;messages&#039; \u65f6&#xff0c;\u670d\u52a1\u5668\u5141\u8bb8\u53d1\u9001 $\/logTrace&#xff0c;\u4f46\u4e0d\u5f97\u643a\u5e26\u53ef\u9009\u7684 verbose \u5b57\u6bb5&#xff1b;<\/li>\n<li>&#039;verbose&#039; \u5b8c\u6574&#xff1a;\u4ec5\u5728 &#039;verbose&#039; \u7ea7\u522b\u4e0b&#xff0c;verbose \u9644\u52a0\u5b57\u6bb5\u624d\u88ab\u5141\u8bb8\u8ba1\u7b97\u5e76\u586b\u5145\u3002<\/li>\n<p>\u6b64\u5916&#xff0c;\u89c4\u8303\u8fd8\u5bf9\u4e24\u79cd\u65e5\u5fd7\u6e20\u9053\u505a\u4e86\u660e\u786e\u5206\u5de5&#xff1a;$\/logTrace \u7528\u4e8e\u7cfb\u7edf\u6027\u7684\u8f68\u8ff9\u4e0a\u62a5&#xff08;systematic trace reporting&#xff09;&#xff0c;\u800c\u5355\u6b21\u7684\u8c03\u8bd5\u6d88\u606f\u5e94\u4f7f\u7528 window\/logMessage \u901a\u77e5\u3002\u8fd9\u63d0\u793a\u5b9e\u73b0\u8005\u5728\u8bbe\u8ba1\u670d\u52a1\u5668\u65e5\u5fd7\u65f6&#xff0c;\u5e94\u5c06&#034;\u53ef\u7ed3\u6784\u5316\u7684\u8f68\u8ff9\u6d41&#034;\u4e0e&#034;\u9762\u5411\u7528\u6237\u7684\u5355\u6761\u65e5\u5fd7\u6d88\u606f&#034;\u533a\u5206\u5bf9\u5f85&#xff0c;\u4e0d\u8981\u6df7\u7528\u3002<\/p>\n<h3>trace \u7684\u521d\u59cb\u503c&#xff1a;InitializeParams.trace<\/h3>\n<p>$\/setTrace \u5904\u7406\u7684\u662f\u8fd0\u884c\u671f\u52a8\u6001\u4fee\u6539&#xff0c;\u800c trace \u7684\u521d\u59cb\u503c\u662f\u5728\u63e1\u624b\u9636\u6bb5\u7531\u5ba2\u6237\u7aef\u901a\u8fc7 initialize \u8bf7\u6c42\u8bbe\u7f6e\u7684\u3002\u5728 _specifications\/lsp\/3.18\/general\/initialize.md \u7684 InitializeParams \u4e2d&#xff1a;<\/p>\n<p>\/**<br \/>\n * The initial trace setting. If omitted trace is disabled (&#039;off&#039;).<br \/>\n *\/<br \/>\ntrace?: TraceValue;<\/p>\n<p>\u8fd9\u91cc\u6709\u4e24\u4e2a\u5173\u952e\u70b9&#xff1a;<\/p>\n<ul>\n<li>trace \u662f\u53ef\u9009\u5b57\u6bb5&#xff0c;\u7c7b\u578b\u540c\u6837\u662f TraceValue&#xff1b;<\/li>\n<li>\u82e5\u7701\u7565&#xff0c;\u5219 trace \u9ed8\u8ba4\u5904\u4e8e\u7981\u7528\u72b6\u6001&#xff0c;\u5373 &#039;off&#039;\u3002\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u670d\u52a1\u5668\u5b9e\u73b0\u5fc5\u987b\u628a&#034;\u672a\u6536\u5230\u4efb\u4f55 trace \u914d\u7f6e&#034;\u89c6\u4e3a&#034;\u4e0d\u4ea7\u751f trace \u8f93\u51fa&#034;&#xff0c;\u800c\u4e0d\u662f\u81ea\u884c\u9ed8\u8ba4\u5f00\u542f\u67d0\u4e2a\u7ea7\u522b\u3002<\/li>\n<\/ul>\n<p>\u4ece\u6d88\u606f\u65b9\u5411\u4e0a\u770b&#xff0c;InitializeParams.trace \u4e0e $\/setTrace \u5747\u7531\u5ba2\u6237\u7aef\u53d1\u8d77&#xff0c;\u524d\u8005\u8d1f\u8d23&#034;\u521d\u59cb\u72b6\u6001&#034;&#xff0c;\u540e\u8005\u8d1f\u8d23&#034;\u540e\u7eed\u53d8\u66f4&#034;&#xff0c;\u4e24\u8005\u5171\u540c\u8986\u76d6\u4e86 trace \u8bbe\u7f6e\u5728\u4f1a\u8bdd\u5168\u751f\u547d\u5468\u671f\u7684\u7ba1\u7406\u3002<\/p>\n<h3>\u5728\u670d\u52a1\u5668\u751f\u547d\u5468\u671f\u4e2d\u7684\u4f4d\u7f6e\u4e0e\u53d1\u9001\u7ea6\u675f<\/h3>\n<p>$\/setTrace \u5c5e\u4e8e LSP \u7684 Server lifecycle&#xff08;\u670d\u52a1\u5668\u751f\u547d\u5468\u671f&#xff09;\u6d88\u606f\u4e4b\u4e00\u3002\u5728 _specifications\/lsp\/3.18\/specification.md \u4e2d&#xff0c;\u751f\u547d\u5468\u671f\u7ae0\u8282\u6309\u5982\u4e0b\u987a\u5e8f\u7f16\u6392&#xff1a;<\/p>\n<li>initialize&#xff08;\u8bf7\u6c42&#xff0c;\u5ba2\u6237\u7aef \u2192 \u670d\u52a1\u5668&#xff0c;\u5efa\u7acb\u4f1a\u8bdd&#xff09;<\/li>\n<li>initialized&#xff08;\u901a\u77e5&#xff09;<\/li>\n<li>$\/setTrace&#xff08;\u901a\u77e5&#xff09;<\/li>\n<li>$\/logTrace&#xff08;\u901a\u77e5&#xff09;<\/li>\n<li>shutdown&#xff08;\u8bf7\u6c42&#xff09;<\/li>\n<li>exit&#xff08;\u901a\u77e5&#xff09;<\/li>\n<p>\u89c4\u8303\u540c\u65f6\u89c4\u5b9a&#xff1a;\u670d\u52a1\u5668\u5728\u54cd\u5e94 initialize \u8bf7\u6c42\u5e76\u8fd4\u56de InitializeResult \u4e4b\u524d&#xff0c;\u4e0d\u5f97\u5411\u5ba2\u6237\u7aef\u53d1\u9001\u4efb\u4f55\u8bf7\u6c42\u6216\u901a\u77e5&#xff08;\u521d\u59cb\u5316\u8fc7\u7a0b\u4e2d\u7684 window\/showMessage\u3001window\/logMessage\u3001telemetry\/event \u53ca window\/showMessageRequest \u9664\u5916&#xff09;\u3002\u7531\u6b64\u53ef\u4ee5\u63a8\u65ad\u51fa\u5bf9 $\/setTrace \u7684\u5b9e\u9645\u7ea6\u675f&#xff1a;<\/p>\n<ul>\n<li>\u5ba2\u6237\u7aef\u5728 initialize \u5b8c\u6210\u63e1\u624b\u3001\u6536\u5230 InitializeResult \u4e4b\u540e&#xff0c;\u624d\u5e94\u5f00\u59cb\u53d1\u9001 $\/setTrace \u901a\u77e5&#xff1b;<\/li>\n<li>\u670d\u52a1\u5668\u7aef\u5728\u5904\u7406 $\/setTrace \u65f6&#xff0c;\u5e94\u5047\u8bbe\u63e1\u624b\u5df2\u5b8c\u6210\u7684\u6b63\u5e38\u751f\u547d\u5468\u671f\u72b6\u6001&#xff0c;\u76f4\u63a5\u66f4\u65b0\u5185\u90e8 trace \u72b6\u6001\u5373\u53ef\u3002<\/li>\n<\/ul>\n<h3>\u5143\u6a21\u578b\u4e2d\u7684\u673a\u5668\u53ef\u8bfb\u8868\u793a<\/h3>\n<p>\u9664\u4e86\u4eba\u7c7b\u53ef\u8bfb\u7684 Markdown \u89c4\u8303&#xff0c;\u672c\u4ed3\u5e93\u8fd8\u63d0\u4f9b\u4e86\u540c\u4e00\u4efd\u5b9a\u4e49\u7684\u673a\u5668\u53ef\u8bfb\u7248\u672c&#xff0c;\u4fbf\u4e8e\u5404\u8bed\u8a00 SDK \u81ea\u52a8\u751f\u6210\u7c7b\u578b\u4e0e\u5206\u53d1\u5c42\u4ee3\u7801\u3002<\/p>\n<h4>\u901a\u77e5\u6761\u76ee\u5b9a\u4e49<\/h4>\n<p>\u5728 metaModel.json \u7684 SetTraceNotification \u6761\u76ee \u4e2d&#xff1a;<\/p>\n<p>{<br \/>\n&#034;method&#034;: &#034;$\/setTrace&#034;,<br \/>\n&#034;typeName&#034;: &#034;SetTraceNotification&#034;,<br \/>\n&#034;messageDirection&#034;: &#034;clientToServer&#034;,<br \/>\n&#034;params&#034;: {<br \/>\n&#034;kind&#034;: &#034;reference&#034;,<br \/>\n&#034;name&#034;: &#034;SetTraceParams&#034;<br \/>\n}<br \/>\n}<\/p>\n<p>messageDirection: &#034;clientToServer&#034; \u4e0e\u6587\u6863\u4e2d\u7684\u65b9\u5411\u7bad\u5934 (:arrow_right:) \u5b8c\u5168\u5bf9\u5e94&#xff0c;\u53ef\u4f5c\u4e3a\u751f\u6210\u5ba2\u6237\u7aef sendNotification(&#039;$\/setTrace&#039;, params) \u8c03\u7528\u3001\u4ee5\u53ca\u670d\u52a1\u5668\u7aef\u901a\u77e5\u5206\u53d1\u5904\u7406\u5668\u7684\u4f9d\u636e\u3002<\/p>\n<h4>\u53c2\u6570\u7ed3\u6784\u5b9a\u4e49<\/h4>\n<p>SetTraceParams \u6761\u76ee \u8868\u660e\u5176\u552f\u4e00\u5c5e\u6027 value \u7684\u7c7b\u578b\u662f\u5f15\u7528&#xff08;reference&#xff09;TraceValue&#xff1a;<\/p>\n<p>{<br \/>\n&#034;name&#034;: &#034;SetTraceParams&#034;,<br \/>\n&#034;properties&#034;: [<br \/>\n{<br \/>\n&#034;name&#034;: &#034;value&#034;,<br \/>\n&#034;type&#034;: {<br \/>\n&#034;kind&#034;: &#034;reference&#034;,<br \/>\n&#034;name&#034;: &#034;TraceValue&#034;<br \/>\n}<br \/>\n}<br \/>\n]<br \/>\n}<\/p>\n<p>\u7ed3\u5408\u524d\u6587 TraceValue \u7684\u679a\u4e3e\u5b9a\u4e49&#xff0c;\u53ef\u4ee5\u5b8c\u6574\u63a8\u6f14\u51fa\u5143\u6a21\u578b\u2192\u7c7b\u578b\u7cfb\u7edf\u2192\u8fd0\u884c\u65f6\u6821\u9a8c\u7684\u5b9e\u73b0\u94fe\u8def&#xff1a;\u751f\u6210\u7684 SDK \u53ef\u5c06 value \u7f16\u8bd1\u4e3a\u8054\u5408\u7c7b\u578b &#039;off&#039; | &#039;messages&#039; | &#039;verbose&#039;&#xff0c;\u5e76\u5728\u53cd\u5e8f\u5217\u5316\u65f6\u5bf9\u672a\u77e5\u5b57\u7b26\u4e32\u62a5\u9519\u3002<\/p>\n<h3>\u5b9e\u73b0\u8981\u70b9\u4e0e\u5b9e\u8df5\u5efa\u8bae<\/h3>\n<p>\u7efc\u5408\u89c4\u8303\u6587\u672c\u4e0e\u4ed3\u5e93\u5143\u6a21\u578b&#xff0c;\u4e24\u4fa7\u5b9e\u73b0 $\/setTrace \u65f6\u53ef\u9075\u5faa\u4ee5\u4e0b\u8981\u70b9&#xff1a;<\/p>\n<p>\u5ba2\u6237\u7aef\u4fa7&#xff08;\u53d1\u9001\u65b9&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\u5728 initialize \u8bf7\u6c42\u4e2d\u643a\u5e26 trace \u5b57\u6bb5\u8bbe\u7f6e\u521d\u59cb\u7ea7\u522b&#xff08;\u7701\u7565\u5373\u89c6\u4e3a &#039;off&#039;&#xff09;&#xff1b;<\/li>\n<li>\u7528\u6237\u6216\u5f00\u53d1\u8005\u4fee\u6539 trace \u9009\u9879\u65f6&#xff0c;\u53d1\u9001 $\/setTrace \u901a\u77e5&#xff0c;value \u4ece &#039;off&#039; \/ &#039;messages&#039; \/ &#039;verbose&#039; \u4e09\u8005\u4e2d\u9009\u53d6&#xff1b;<\/li>\n<li>\u8be5\u901a\u77e5\u65e0\u9700\u7b49\u5f85\u54cd\u5e94&#xff0c;\u5c5e\u4e00\u6b21\u6027\u3001\u5c3d\u529b\u6295\u9012\u7684\u5f02\u6b65\u6d88\u606f\u3002<\/li>\n<\/ul>\n<p>\u670d\u52a1\u5668\u4fa7&#xff08;\u63a5\u6536\u65b9&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\u5728 initialize \u65f6\u8bb0\u5f55 params.trace \u4f5c\u4e3a\u521d\u59cb\u503c&#xff0c;\u7f3a\u7701\u6309 &#039;off&#039; \u5904\u7406&#xff1b;<\/li>\n<li>\u5b9e\u73b0 $\/setTrace \u901a\u77e5\u7684\u5206\u53d1\u5904\u7406\u5668&#xff0c;\u6536\u5230\u540e\u66f4\u65b0\u5185\u90e8 trace \u72b6\u6001\u53d8\u91cf&#xff08;\u4ece\u6e90\u7801\u7ed3\u6784\u770b&#xff0c;\u8fd9\u4e00\u72b6\u6001\u901a\u5e38\u7531\u670d\u52a1\u5668\u8fd0\u884c\u65f6\u6301\u6709\u5e76\u8d2f\u7a7f\u4f1a\u8bdd&#xff09;&#xff1b;<\/li>\n<li>\u5728\u4ea7\u751f\u6267\u884c\u8f68\u8ff9\u65f6&#xff0c;\u4f9d\u636e\u5f53\u524d\u7ea7\u522b\u51b3\u5b9a\u662f\u5426\u53d1\u9001 $\/logTrace&#xff1a;&#039;off&#039; \u4e0d\u53d1&#xff1b;&#039;messages&#039; \u53ea\u53d1 message&#xff1b;&#039;verbose&#039; \u989d\u5916\u586b\u5145 verbose \u5b57\u6bb5&#xff1b;<\/li>\n<li>\u5c06\u7cfb\u7edf\u6027\u8f68\u8ff9\u8d70 $\/logTrace&#xff0c;\u5c06\u5355\u6761\u8c03\u8bd5\u4fe1\u606f\u8d70 window\/logMessage&#xff0c;\u4e8c\u8005\u804c\u8d23\u5206\u79bb\u3002<\/li>\n<\/ul>\n<p>\u8c03\u8bd5\u6392\u969c\u573a\u666f&#xff1a;&#039;verbose&#039; \u7ea7\u522b\u5e38\u7528\u4e8e\u5b9a\u4f4d\u534f\u8bae\u4ea4\u4e92\u7684\u6df1\u5c42\u6b21\u95ee\u9898&#xff08;\u5982\u8bf7\u6c42\u53c2\u6570\u3001\u5185\u90e8\u72b6\u6001\u53d8\u5316&#xff09;&#xff0c;&#039;messages&#039; \u5219\u9002\u5408\u65e5\u5e38\u5f00\u53d1\u65f6\u786e\u8ba4\u6d88\u606f\u5f80\u6765&#xff0c;&#039;off&#039; \u7528\u4e8e\u6b63\u5f0f\u8fd0\u884c\u73af\u5883\u4e0b\u7684\u6027\u80fd\u4e0e\u566a\u97f3\u63a7\u5236\u3002\u901a\u8fc7 $\/setTrace \u53ef\u5728\u4e0d\u91cd\u542f\u670d\u52a1\u5668\u7684\u524d\u63d0\u4e0b\u52a8\u6001\u5207\u6362\u8fd9\u4e09\u4e2a\u7ea7\u522b&#xff0c;\u8fd9\u4e5f\u662f\u5b83\u4f5c\u4e3a\u751f\u547d\u5468\u671f\u6d88\u606f\u88ab\u8bbe\u8ba1\u51fa\u6765\u7684\u610f\u4e49\u6240\u5728\u3002<\/p>\n<h3>\u5c0f\u7ed3<\/h3>\n<p>$\/setTrace \u662f LSP \u751f\u547d\u5468\u671f\u4e2d\u4e00\u6761\u8f7b\u91cf\u4f46\u5173\u952e\u7684\u5ba2\u6237\u7aef \u2192 \u670d\u52a1\u5668\u901a\u77e5&#xff0c;\u5b83\u4ee5 SetTraceParams.value \u627f\u8f7d\u4e09\u6863 TraceValue&#xff08;&#039;off&#039;\u3001&#039;messages&#039;\u3001&#039;verbose&#039;&#xff09;&#xff0c;\u4e0e\u670d\u52a1\u5668 \u2192 \u5ba2\u6237\u7aef\u7684 $\/logTrace \u901a\u77e5\u914d\u5bf9\u6784\u6210\u5b8c\u6574\u7684 trace \u4e0a\u62a5\u673a\u5236\u3002\u5176\u521d\u59cb\u503c\u7531 InitializeParams.trace \u7ea6\u5b9a&#xff08;\u7f3a\u7701 &#039;off&#039;&#xff09;&#xff0c;\u540e\u7eed\u53d8\u66f4\u5219\u5b8c\u5168\u7531 $\/setTrace \u9a71\u52a8\u3002\u672c\u4ed3\u5e93\u7684 3.18 \u89c4\u8303\u6587\u6863\u3001setTrace \u5b9a\u4e49\u3001logTrace \u5b9a\u4e49 \u4e0e \u5143\u6a21\u578b JSON \u4e09\u5904\u76f8\u4e92\u5370\u8bc1&#xff0c;\u53ef\u4f5c\u4e3a\u5404\u8bed\u8a00 LSP SDK \u5b9e\u73b0\u8be5\u901a\u77e5\u7684\u6743\u5a01\u4f9d\u636e\u3002<\/p>\n<p>  <img loading=\"lazy\" decoding=\"async\" class=\"gcb-icon-like\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261005235650-6ac43942efb7e.svg\" alt=\"\" width=\"16\" height=\"16\" \/> <span class=\"gcb-like-text\">\u8d5e<\/span>  <\/p>\n<p>   <span class=\"gcb-share-text\">\u5206\u4eab<\/span>  <\/p>\n<ul class=\"gcb-tag-list\">\n<li><span class=\"gcb-tag\">\u5f00\u53d1\u5de5\u5177<\/span><\/li>\n<\/ul>\n<h3 class=\"gcb-project-title\">\u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011language-server-protocol<\/h3>\n<p class=\"gcb-project-desc\">Defines a common protocol for language servers.<\/p>\n<p>    <span class=\"gcb-project-addr-label\">\u9879\u76ee\u5730\u5740&#xff1a;<\/span><br \/>\n    <span class=\"gcb-project-addr-link\">https:\/\/gitcode.com\/gh_mirrors\/la\/language-server-protocol<\/span> <\/p>\n<p>  <span class=\"gcb-project-btn\"> <span class=\"gcb-project-btn-main\">\u70b9\u51fb\u67e5\u770b<\/span> <span class=\"gcb-project-btn-sub\">\u514d\u8d39\u4e0b\u8f7d<\/span> <\/span> <\/p>\n<h4 class=\"gcb-related-title\">\u76f8\u5173\u63a8\u8350<\/h4>\n<ul class=\"gcb-related-list\">\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">kubernetes-kafka\u67b6\u6784\u89e3\u6790&#xff1a;\u6df1\u5165\u7406\u89e3Kafka StatefulSet\u8bbe\u8ba1\u539f\u7406<\/h5>\n<p class=\"gcb-related-item-desc\">kubernetes kafka\u67b6\u6784\u89e3\u6790&#xff1a;\u6df1\u5165\u7406\u89e3Kafka StatefulSet\u8bbe\u8ba1\u539f\u7406 Kubernetes Kafka\u662f\u4e00\u4e2a\u5c06Kafka\u96c6\u7fa4\u90e8\u7f72\u4e3aKub<\/p>\n<p>     <span class=\"gcb-tag\">\u5f00\u53d1\u5de5\u5177<\/span>\n      <\/li>\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\"> GraphiQL\u8bed\u8a00\u670d\u52a1\u5668&#xff1a;LSP\u534f\u8bae\u7684GraphQL\u8bed\u8a00\u670d\u52a1\u5b9e\u73b0<\/h5>\n<p class=\"gcb-related-item-desc\">GraphiQL\u8bed\u8a00\u670d\u52a1\u5668&#xff1a;LSP\u534f\u8bae\u7684GraphQL\u8bed\u8a00\u670d\u52a1\u5b9e\u73b0 \u5f15\u8a00&#xff1a;GraphQL\u5f00\u53d1\u8005\u7684\u667a\u80fd\u52a9\u624b \u4f60\u662f\u5426\u66fe\u7ecf\u5728\u7f16\u5199GraphQL\u67e5\u8be2\u65f6\u9047\u5230\u8fc7\u4ee5\u4e0b\u75db\u70b9&#xff1f; <\/p>\n<p>     <span class=\"gcb-tag\">\u5f00\u53d1\u5de5\u5177<\/span><br \/>\n     <span class=\"gcb-tag\">\u540e\u7aef<\/span>\n      <\/li>\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">3\u5206\u949f\u4e0a\u624bAnystyle&#xff1a;\u65b0\u624b\u5fc5\u5907\u7684\u5f15\u6587\u89e3\u6790\u5de5\u5177\u4f7f\u7528\u6559\u7a0b<\/h5>\n<p class=\"gcb-related-item-desc\">3\u5206\u949f\u4e0a\u624bAnystyle&#xff1a;\u65b0\u624b\u5fc5\u5907\u7684\u5f15\u6587\u89e3\u6790\u5de5\u5177\u4f7f\u7528\u6559\u7a0b Anystyle\u662f\u4e00\u6b3e\u5feb\u901f\u667a\u80fd\u7684\u5f15\u6587\u89e3\u6790\u5de5\u5177&#xff0c;\u80fd\u591f\u5e2e\u52a9\u7814\u7a76\u8005\u3001\u5b66\u751f\u548c\u5b66\u672f\u5199\u4f5c\u8005\u8f7b\u677e\u63d0\u53d6\u548c\u683c\u5f0f\u5316\u53c2\u8003\u6587<\/p>\n<p>     <span class=\"gcb-tag\">NLP<\/span>\n      <\/li>\n<\/ul>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0a\u4e00\u7bc7&#xff1a;<\/span><br \/>\n  5\u4e2a\u6b65\u9aa4\u5feb\u901f\u4e0a\u624bSfMLearner&#xff1a;\u65b0\u624b\u5fc5\u8bfb\u6559\u7a0b <\/p>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0b\u4e00\u7bc7&#xff1a;<\/span><br \/>\n  \u57fa\u4e8e SPDK \u7684 Longhorn V2 \u6570\u636e\u5f15\u64ce\u5377&#xff1a;\u67b6\u6784\u8bbe\u8ba1\u4e0e\u96c6\u7fa4\u90e8\u7f72\u5b9e\u6218 <\/p>\n<p>\u521b\u4f5c\u58f0\u660e\uff1a\u672c\u6587\u90e8\u5206\u5185\u5bb9\u7531AI\u8f85\u52a9\u751f\u6210\uff08AIGC\uff09\uff0c\u4ec5\u4f9b\u53c2\u8003<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f00\u53d1\u5de5\u5177 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011language-server-protocol Defines a common protocol for language servers. \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/la\/language-server-protocol \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d  \u5728\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae&#xff08;LSP&#xff09;\u7684\u670d\u52a1\u5668\u751f\u547d\u5468\u671f\u6d88\u606f\u4e2d&#xff0c;$\/setTrace \u662f\u5ba2\u6237\u7aef\u7528\u4e8e\u52a8\u6001\u4fee\u6539\u8bed\u8a00\u670d\u52a1<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-113381","post","type-post","status-publish","format-standard","hentry","category-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae `$\/setTrace` \u901a\u77e5\u8be6\u89e3\uff1a\u670d\u52a1\u7aef Trace \u7ea7\u522b\u7684\u52a8\u6001\u8c03\u6574\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/113381.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae `$\/setTrace` \u901a\u77e5\u8be6\u89e3\uff1a\u670d\u52a1\u7aef Trace \u7ea7\u522b\u7684\u52a8\u6001\u8c03\u6574\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u5f00\u53d1\u5de5\u5177 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011language-server-protocol Defines a common protocol for language servers. \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/la\/language-server-protocol \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d \u5728\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae&#xff08;LSP&#xff09;\u7684\u670d\u52a1\u5668\u751f\u547d\u5468\u671f\u6d88\u606f\u4e2d&#xff0c;$\/setTrace \u662f\u5ba2\u6237\u7aef\u7528\u4e8e\u52a8\u6001\u4fee\u6539\u8bed\u8a00\u670d\u52a1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/113381.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-05T23:56:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261005235650-6ac43942efb7e.svg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/113381.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/113381.html\",\"name\":\"\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae `$\/setTrace` \u901a\u77e5\u8be6\u89e3\uff1a\u670d\u52a1\u7aef Trace \u7ea7\u522b\u7684\u52a8\u6001\u8c03\u6574\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-05T23:56:52+00:00\",\"dateModified\":\"2026-10-05T23:56:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/113381.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/113381.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/113381.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae `$\/setTrace` \u901a\u77e5\u8be6\u89e3\uff1a\u670d\u52a1\u7aef Trace \u7ea7\u522b\u7684\u52a8\u6001\u8c03\u6574\u673a\u5236\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae `$\/setTrace` \u901a\u77e5\u8be6\u89e3\uff1a\u670d\u52a1\u7aef Trace \u7ea7\u522b\u7684\u52a8\u6001\u8c03\u6574\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/113381.html","og_locale":"zh_CN","og_type":"article","og_title":"\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae `$\/setTrace` \u901a\u77e5\u8be6\u89e3\uff1a\u670d\u52a1\u7aef Trace \u7ea7\u522b\u7684\u52a8\u6001\u8c03\u6574\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u5f00\u53d1\u5de5\u5177 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011language-server-protocol Defines a common protocol for language servers. \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/la\/language-server-protocol \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d \u5728\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae&#xff08;LSP&#xff09;\u7684\u670d\u52a1\u5668\u751f\u547d\u5468\u671f\u6d88\u606f\u4e2d&#xff0c;$\/setTrace \u662f\u5ba2\u6237\u7aef\u7528\u4e8e\u52a8\u6001\u4fee\u6539\u8bed\u8a00\u670d\u52a1","og_url":"https:\/\/www.wsisp.com\/helps\/113381.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-05T23:56:52+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261005235650-6ac43942efb7e.svg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/113381.html","url":"https:\/\/www.wsisp.com\/helps\/113381.html","name":"\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae `$\/setTrace` \u901a\u77e5\u8be6\u89e3\uff1a\u670d\u52a1\u7aef Trace \u7ea7\u522b\u7684\u52a8\u6001\u8c03\u6574\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-05T23:56:52+00:00","dateModified":"2026-10-05T23:56:52+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/113381.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/113381.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/113381.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae `$\/setTrace` \u901a\u77e5\u8be6\u89e3\uff1a\u670d\u52a1\u7aef Trace \u7ea7\u522b\u7684\u52a8\u6001\u8c03\u6574\u673a\u5236"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/113381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=113381"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/113381\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=113381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=113381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=113381"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=113381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}