<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>前端调试 | 折腾啥</title><description>Power Users/Automators 折腾/讨论/分享各种开源工具/脚本/自动化工作流👥 @zhetengsha_group📌 合集 https://t.me/zhetengsha/2🎁 恰饭 https://t.me/zhetengsha/957📢 广告投放 @xream @xream_botBuy ads: https://telega.io/c/zhetengshafeedId:55438372655431680+userId:62307599601855488</description><link>http://telegram.zhetengsha.eu.org</link><item><title>Browser AI Assistant: 面向 Chrome / Edge 的浏览器侧边栏 AI 工作台• 基于当前网页、多标签页、图片、Network 请求、JS 源码和运行时信息组织 AI 上下文• 支持多模型渠道、Tavily 搜索、提示词管理、隐私会话和多端同步• 提供受控浏览器自动化、接口分析、Source Map 分析、请求重放和会话导出能力</title><link>http://telegram.zhetengsha.eu.org/posts/6375</link><guid isPermaLink="true">http://telegram.zhetengsha.eu.org/posts/6375</guid><pubDate>Sat, 11 Jul 2026 12:59:58 GMT</pubDate><content:encoded>&lt;u&gt;Browser AI Assistant: 面向 Chrome / Edge 的浏览器侧边栏 AI 工作台&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;• 基于当前网页、多标签页、图片、Network 请求、JS 源码和运行时信息组织 AI 上下文&lt;br /&gt;&lt;br /&gt;• 支持多模型渠道、Tavily 搜索、提示词管理、隐私会话和多端同步&lt;br /&gt;&lt;br /&gt;• 提供受控浏览器自动化、接口分析、Source Map 分析、请求重放和会话导出能力&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://github.com/AhYi8/browser-ai-assistant&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://github.com/AhYi8/browser-ai-assistant&quot;&gt;https://github.com/AhYi8/browser-ai-assistant&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img class=&quot;tg-emoji&quot; src=&quot;/static/https://telegram.me/i/emoji/6327880277607583303.webp&quot; alt=&quot;&quot; loading=&quot;lazy&quot; width=&quot;20&quot; height=&quot;20&quot; /&gt; &lt;a href=&quot;https://t.me/zhetengsha/2&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;合集&quot;&gt;合集&lt;/a&gt; &lt;img class=&quot;tg-emoji&quot; src=&quot;/static/https://telegram.me/i/emoji/6021860481923288796.webp&quot; alt=&quot;&quot; loading=&quot;lazy&quot; width=&quot;20&quot; height=&quot;20&quot; /&gt; &lt;a href=&quot;https://t.me/zhetengsha_group&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;群组&quot;&gt;群组&lt;/a&gt; &lt;img class=&quot;tg-emoji&quot; src=&quot;/static/https://telegram.me/i/emoji/6327792445526380187.webp&quot; alt=&quot;&quot; loading=&quot;lazy&quot; width=&quot;20&quot; height=&quot;20&quot; /&gt; &lt;a href=&quot;https://t.me/zhetengsha/957&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;恰饭&quot;&gt;恰饭&lt;/a&gt; &lt;img class=&quot;tg-emoji&quot; src=&quot;/static/https://telegram.me/i/emoji/6330367862535884142.webp&quot; alt=&quot;&quot; loading=&quot;lazy&quot; width=&quot;20&quot; height=&quot;20&quot; /&gt;&lt;a href=&quot;https://t.me/xream_bot&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;联系推广&quot;&gt;联系推广&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img class=&quot;tg-emoji&quot; src=&quot;/static/https://telegram.me/i/emoji/6327836885552991740.webp&quot; alt=&quot;&quot; loading=&quot;lazy&quot; width=&quot;20&quot; height=&quot;20&quot; /&gt;&lt;a href=&quot;/search/result?q=%23%E6%B5%8F%E8%A7%88%E5%99%A8%E6%8F%92%E4%BB%B6&quot; title=&quot;#浏览器插件&quot;&gt;#浏览器插件&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23AI%E5%8A%A9%E6%89%8B&quot; title=&quot;#AI助手&quot;&gt;#AI助手&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Chrome&quot; title=&quot;#Chrome&quot;&gt;#Chrome&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Edge&quot; title=&quot;#Edge&quot;&gt;#Edge&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E5%89%8D%E7%AB%AF%E8%B0%83%E8%AF%95&quot; title=&quot;#前端调试&quot;&gt;#前端调试&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Web%E8%87%AA%E5%8A%A8%E5%8C%96&quot; title=&quot;#Web自动化&quot;&gt;#Web自动化&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23GitHub&quot; title=&quot;#GitHub&quot;&gt;#GitHub&lt;/a&gt;&lt;a class=&quot;tgme_widget_message_video_player not_supported js-message_video_player&quot; href=&quot;https://t.me/zhetengsha/6375&quot;&gt;&lt;i class=&quot;tgme_widget_message_video_thumb&quot; style=&quot;background-image:url(&apos;/static/https://cdn5.telesco.pe/file/vh6cozx215BIS4olb3QK9IIrN0eARnnsHSwkcBJvhOXI6m_WQCRfe4QDBzNbRUNEvyhoHCO0C307_bFoRMM1iMjhvUl8n6Afx1d8VNEJ2os4Lm609x4rOaVl4--rYrxfmAp1UJpz0J378-MitoZ8v25OHrOshiFjuY3Of9CK2LzpzMEHqjENUGdlJiZPlWXL7rYke47q5bOr-nig6oDbfi0OHCKo8ywGhmZOl85A6p1iYfjpQlkzRVtxXqZKhTgU_lIPDJc6AUigbqt5SkV5aMKOj5oE062vs5qxAQlgdITLYv4KFWR-zwM89fjer1zYAyhvOKuoJo339NlIdPuz2g&apos;)&quot;&gt;&lt;/i&gt;

&lt;div class=&quot;tgme_widget_message_video_wrap&quot; style=&quot;width:2560px;padding-top:53.828125%&quot;&gt;
  
&lt;/div&gt;
&lt;div class=&quot;message_video_play js-message_video_play&quot;&gt;&lt;/div&gt;
&lt;time class=&quot;message_video_duration js-message_video_duration&quot;&gt;3:12&lt;/time&gt;
&lt;div class=&quot;message_media_not_supported_wrap&quot;&gt;
  &lt;div class=&quot;message_media_not_supported&quot;&gt;
    &lt;div class=&quot;message_media_not_supported_label&quot;&gt;Media is too big&lt;/div&gt;
    &lt;span class=&quot;message_media_view_in_telegram&quot;&gt;VIEW IN TELEGRAM&lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;&lt;/a&gt;</content:encoded></item><item><title>#优质博文 #JavaScript #新特性 #前端 #错误处理Error chaining in JavaScript: cleaner debugging with Error.cause</title><link>http://telegram.zhetengsha.eu.org/posts/4114</link><guid isPermaLink="true">http://telegram.zhetengsha.eu.org/posts/4114</guid><pubDate>Sat, 15 Nov 2025 04:03:40 GMT</pubDate><content:encoded>&lt;div class=&quot;tgme_widget_message_forwarded_from accent_color&quot;&gt;Forwarded from &lt;a class=&quot;tgme_widget_message_forwarded_from_name&quot; href=&quot;https://t.me/cosine_front_end/3053&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span&gt;cosine - 前端人の日常频道&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;/search/result?q=%23%E4%BC%98%E8%B4%A8%E5%8D%9A%E6%96%87&quot; title=&quot;#优质博文&quot;&gt;#优质博文&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23JavaScript&quot; title=&quot;#JavaScript&quot;&gt;#JavaScript&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E6%96%B0%E7%89%B9%E6%80%A7&quot; title=&quot;#新特性&quot;&gt;#新特性&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E5%89%8D%E7%AB%AF&quot; title=&quot;#前端&quot;&gt;#前端&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E9%94%99%E8%AF%AF%E5%A4%84%E7%90%86&quot; title=&quot;#错误处理&quot;&gt;#错误处理&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://allthingssmitty.com/2025/11/10/error-chaining-in-javascript-cleaner-debugging-with-error-cause/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;Error chaining in JavaScript: cleaner debugging with Error.cause&quot;&gt;Error chaining in JavaScript: cleaner debugging with Error.cause&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;tg-expandable&quot;&gt;
      &lt;input type=&quot;checkbox&quot; id=&quot;expand-0-0&quot; class=&quot;tg-expandable__checkbox&quot; aria-label=&quot;Toggle hidden content&quot; aria-controls=&quot;expand-0-0-content&quot; /&gt;
      &lt;div id=&quot;expand-0-0-content&quot; class=&quot;tg-expandable__content&quot;&gt;AI 摘要：本文介绍了在 JavaScript (ES2022) 中引入的 Error.cause 属性，展示它如何让错误处理更具可追溯性。作者 Matt Smith 通过实例说明了传统错误包裹的缺陷，以及 Error.cause 在保持原始堆栈信息、改进调试体验和测试断言方面的优势。最终总结出一套现代错误链最佳实践，帮助开发者构建更清晰、更稳健的错误追踪体系。&lt;/div&gt;
      &lt;label for=&quot;expand-0-0&quot; class=&quot;tg-expandable__toggle&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Toggle hidden content&lt;/span&gt;&lt;/label&gt;
    &lt;/div&gt;&lt;br /&gt;[以下是方便搜索索引的大纲(AI 生成)，请读原文]&lt;br /&gt;&lt;div class=&quot;tg-expandable&quot;&gt;
      &lt;input type=&quot;checkbox&quot; id=&quot;expand-0-1&quot; class=&quot;tg-expandable__checkbox&quot; aria-label=&quot;Toggle hidden content&quot; aria-controls=&quot;expand-0-1-content&quot; /&gt;
      &lt;div id=&quot;expand-0-1-content&quot; class=&quot;tg-expandable__content&quot;&gt;1.  传统错误处理的问题&lt;br /&gt;•   层层调用的代码容易丢失原始错误信息；&lt;br /&gt;•   以字符串拼接错误信息会破坏堆栈和错误类型；&lt;br /&gt;•   导致调试困难，追踪难度高。&lt;br /&gt;&lt;br /&gt;2.  引入 Error.cause 的改进&lt;br /&gt;•   通过 new Error(message, { cause }) 保留原始错误；&lt;br /&gt;•   可同时访问顶层与底层堆栈信息；&lt;br /&gt;•   cause 属性为非枚举属性，不污染日志或循环输出；&lt;br /&gt;•   与 message、stack 一样保持一致的行为。&lt;br /&gt;&lt;br /&gt;3.  实践与代码演示&lt;br /&gt;•   示例：从 JSON.parse 到自定义函数的错误传递；&lt;br /&gt;•   在日志中手动输出 err.cause 获取完整上下文；&lt;br /&gt;•   适合层次式系统（如服务嵌套调用）排查问题。&lt;br /&gt;&lt;br /&gt;4.  历史背景与 cause 出现前的替代方案&lt;br /&gt;•   旧方案包括自定义字段 .originalError、字符串拼接等；&lt;br /&gt;•   这些方式不统一且容易破坏原始错误结构；&lt;br /&gt;•   标准化的 cause 提供更安全一致的机制。&lt;br /&gt;&lt;br /&gt;5.  自定义错误类的支持&lt;br /&gt;•   在自定义类中通过 super(message, { cause }) 传递原因；&lt;br /&gt;•   适用 ES2022+ 环境即可直接使用；&lt;br /&gt;•   对 TypeScript 用户，需在 tsconfig.json 中启用 &quot;target&quot;: &quot;es2022&quot; 与 &quot;lib&quot;: [&quot;es2022&quot;]。&lt;br /&gt;&lt;br /&gt;6.  在测试中的应用&lt;br /&gt;•   测试断言可直接验证 err.cause 类型；&lt;br /&gt;•   提升测试可读性与准确性。&lt;br /&gt;&lt;br /&gt;7.  实用技巧与注意事项&lt;br /&gt;•   浏览器默认不输出层级错误链，须手动打印；&lt;br /&gt;•   不建议过度使用错误链，避免干扰阅读；&lt;br /&gt;•   可递归打印完整错误链（logErrorChain 与 logFullErrorChain 示例）；&lt;br /&gt;•   实践场景：数据库异常→业务异常→服务异常的多层错误追踪。&lt;br /&gt;&lt;br /&gt;8.  环境支持与现代用法总结&lt;br /&gt;•   支持于现代浏览器与运行环境（Chrome 93+、Node.js 16.9+、Deno、Bun 等）；&lt;br /&gt;•   推荐实践：&lt;br /&gt;    •   &lt;i class=&quot;emoji&quot;&gt;&lt;b&gt;✅&lt;/b&gt;&lt;/i&gt; 使用 Error(message, { cause })&lt;br /&gt;    •   &lt;i class=&quot;emoji&quot;&gt;&lt;b&gt;✅&lt;/b&gt;&lt;/i&gt; 支持内建与自定义错误类型&lt;br /&gt;    •   &lt;i class=&quot;emoji&quot;&gt;&lt;b&gt;✅&lt;/b&gt;&lt;/i&gt; 改善日志和调试体验&lt;br /&gt;    •   &lt;i class=&quot;emoji&quot;&gt;&lt;b&gt;✅&lt;/b&gt;&lt;/i&gt; 对 TypeScript 进行正确配置&lt;br /&gt;    •   &lt;i class=&quot;emoji&quot;&gt;&lt;b&gt;⚠️&lt;/b&gt;&lt;/i&gt; 记得手动输出或递归追踪错误链。&lt;/div&gt;
      &lt;label for=&quot;expand-0-1&quot; class=&quot;tg-expandable__toggle&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Toggle hidden content&lt;/span&gt;&lt;/label&gt;
    &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;author Matt Smith&lt;/i&gt;&lt;a class=&quot;tgme_widget_message_link_preview&quot; href=&quot;https://allthingssmitty.com/2025/11/10/error-chaining-in-javascript-cleaner-debugging-with-error-cause/?utm_source=substack&amp;amp;utm_medium=email&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;Use JavaScript&apos;s &apos;cause&apos; property to chain errors, preserve context, and simplify debugging. Cleaner stack traces, better test assertions.&quot;&gt;
  &lt;i class=&quot;link_preview_right_image&quot; style=&quot;background-image:url(&apos;https://cdn4.telesco.pe/file/rsSVYPhVcHXLjUTDyRZzFl-cmwVFLU9cmzqvnl3VUUDVsFfn8T8jIlZL0wV7hqeZFz7RmWyd1I_cPUsRCr78zTyzyvPVgD3suy5rpctNwMCa6ToD4QB8pe1adTh5EAfOzbsO8ThJHOpGGegeRPPb7RpuvVJD6mVggn3eqzIRW4idf8yjCIuRsMiYRd9xH0-yPFEn1dARMTAmtvW-vHSAMuPzhzWV-dkp2LYjB9Yks4-F_78xGdxx_B6EalkoXUrtkC9W2llTcRlQqEn3MKdO_enTzjeQ2NpRQiFZZ8cUs1kZv5GjuKU-EfRPbfcozw3t_ndBS_IawZdAwu8YqqoOKA.jpg&apos;)&quot;&gt;&lt;/i&gt;
  &lt;div class=&quot;link_preview_site_name accent_color&quot;&gt;Allthingssmitty&lt;/div&gt;
  
  &lt;div class=&quot;link_preview_title&quot;&gt;Error chaining in JavaScript: cleaner debugging with Error.cause - Matt Smith&lt;/div&gt;
  &lt;div class=&quot;link_preview_description&quot;&gt;Use JavaScript&apos;s &apos;cause&apos; property to chain errors, preserve context, and simplify debugging. Cleaner stack traces, better test assertions.&lt;/div&gt;
&lt;/a&gt;</content:encoded></item></channel></rss>