[{"data":1,"prerenderedAt":4116},["ShallowReactive",2],{"article-/topics/ai/cursor-real-project-workflow-from-brief-to-review":3,"related-ai":764,"content-query-BN7LMryrNK":3527},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"topic":5,"author":11,"tags":12,"image":17,"imageQuery":18,"pexelsPhotoId":19,"pexelsUrl":20,"featured":6,"readingTime":21,"body":22,"_type":758,"_id":759,"_source":760,"_file":761,"_stem":762,"_extension":763},"/topics/ai/cursor-real-project-workflow-from-brief-to-review","ai",false,"","Cursor 真实项目工作流：从需求说明、代码修改到 Review 验收","搜索 cursor 的用户不只想知道它是什么，更想知道真实项目里怎么用才不失控。本文给出需求拆解、文件定位、小步修改、验证回归和代码审查的完整流程。","2026-05-04","HTMLPAGE 团队",[13,14,15,16],"Cursor","AI 编程","代码审查","工程流程","/images/articles/cursor-real-project-workflow-from-brief-to-review-featured.jpg","software developer code review workflow laptop desk",34804004,"https://www.pexels.com/photo/laptop-with-code-editor-on-wooden-desk-34804004/",13,{"type":23,"children":24,"toc":745},"root",[25,33,38,68,90,97,102,225,230,236,241,246,258,263,269,274,297,302,311,316,322,327,444,449,455,460,489,494,503,508,514,519,552,557,566,571,577,582,587,610,615,621,693,698,703,708],{"type":26,"tag":27,"props":28,"children":29},"element","p",{},[30],{"type":31,"value":32},"text","很多 Cursor 教程停留在“能聊天、能补全、能生成代码”，但真实项目里更重要的问题是：如何让它在不破坏工程秩序的情况下参与交付。",{"type":26,"tag":27,"props":34,"children":35},{},[36],{"type":31,"value":37},"一个可用的 Cursor 工作流，至少要回答五件事：",{"type":26,"tag":39,"props":40,"children":41},"ol",{},[42,48,53,58,63],{"type":26,"tag":43,"props":44,"children":45},"li",{},[46],{"type":31,"value":47},"需求怎么写，AI 才不会猜错",{"type":26,"tag":43,"props":49,"children":50},{},[51],{"type":31,"value":52},"文件怎么定位，才不会改偏",{"type":26,"tag":43,"props":54,"children":55},{},[56],{"type":31,"value":57},"修改怎么分步，才方便回滚",{"type":26,"tag":43,"props":59,"children":60},{},[61],{"type":31,"value":62},"验证怎么设计，才不只靠肉眼",{"type":26,"tag":43,"props":64,"children":65},{},[66],{"type":31,"value":67},"Review 怎么做，才不会漏掉副作用",{"type":26,"tag":27,"props":69,"children":70},{},[71,73,80,82,88],{"type":31,"value":72},"如果你刚开始使用，可以先看 ",{"type":26,"tag":74,"props":75,"children":77},"a",{"href":76},"/topics/ai/cursor-tutorial",[78],{"type":31,"value":79},"Cursor 使用教程",{"type":31,"value":81}," 和 ",{"type":26,"tag":74,"props":83,"children":85},{"href":84},"/topics/ai/cursor-project-prompt-spec-template",[86],{"type":31,"value":87},"Cursor 项目级提示词模板",{"type":31,"value":89},"，再用本文建立真实项目流程。",{"type":26,"tag":91,"props":92,"children":94},"h2",{"id":93},"先给结论cursor-最适合做小步可验证的工程协作",[95],{"type":31,"value":96},"先给结论：Cursor 最适合做“小步可验证”的工程协作",{"type":26,"tag":27,"props":98,"children":99},{},[100],{"type":31,"value":101},"Cursor 不适合被当成“一句话重写项目”的魔法按钮。它更适合做一类明确、边界清楚、能验证的任务：",{"type":26,"tag":103,"props":104,"children":105},"table",{},[106,130],{"type":26,"tag":107,"props":108,"children":109},"thead",{},[110],{"type":26,"tag":111,"props":112,"children":113},"tr",{},[114,120,125],{"type":26,"tag":115,"props":116,"children":117},"th",{},[118],{"type":31,"value":119},"任务类型",{"type":26,"tag":115,"props":121,"children":122},{},[123],{"type":31,"value":124},"是否适合 Cursor",{"type":26,"tag":115,"props":126,"children":127},{},[128],{"type":31,"value":129},"使用方式",{"type":26,"tag":131,"props":132,"children":133},"tbody",{},[134,153,171,189,207],{"type":26,"tag":111,"props":135,"children":136},{},[137,143,148],{"type":26,"tag":138,"props":139,"children":140},"td",{},[141],{"type":31,"value":142},"文案、样式、小组件",{"type":26,"tag":138,"props":144,"children":145},{},[146],{"type":31,"value":147},"很适合",{"type":26,"tag":138,"props":149,"children":150},{},[151],{"type":31,"value":152},"限定文件后直接修改",{"type":26,"tag":111,"props":154,"children":155},{},[156,161,166],{"type":26,"tag":138,"props":157,"children":158},{},[159],{"type":31,"value":160},"表单校验、状态修复",{"type":26,"tag":138,"props":162,"children":163},{},[164],{"type":31,"value":165},"适合",{"type":26,"tag":138,"props":167,"children":168},{},[169],{"type":31,"value":170},"先定位数据流和测试点",{"type":26,"tag":111,"props":172,"children":173},{},[174,179,184],{"type":26,"tag":138,"props":175,"children":176},{},[177],{"type":31,"value":178},"跨模块重构",{"type":26,"tag":138,"props":180,"children":181},{},[182],{"type":31,"value":183},"谨慎",{"type":26,"tag":138,"props":185,"children":186},{},[187],{"type":31,"value":188},"分阶段、每步 Review",{"type":26,"tag":111,"props":190,"children":191},{},[192,197,202],{"type":26,"tag":138,"props":193,"children":194},{},[195],{"type":31,"value":196},"鉴权、支付、安全逻辑",{"type":26,"tag":138,"props":198,"children":199},{},[200],{"type":31,"value":201},"高风险",{"type":26,"tag":138,"props":203,"children":204},{},[205],{"type":31,"value":206},"只让它辅助分析，人工实现和审查",{"type":26,"tag":111,"props":208,"children":209},{},[210,215,220],{"type":26,"tag":138,"props":211,"children":212},{},[213],{"type":31,"value":214},"架构迁移",{"type":26,"tag":138,"props":216,"children":217},{},[218],{"type":31,"value":219},"不适合一次完成",{"type":26,"tag":138,"props":221,"children":222},{},[223],{"type":31,"value":224},"拆成多轮设计与验证",{"type":26,"tag":27,"props":226,"children":227},{},[228],{"type":31,"value":229},"核心原则是：让 Cursor 参与工程链路，而不是替代工程链路。",{"type":26,"tag":91,"props":231,"children":233},{"id":232},"一需求说明要写成任务单不要写成愿望",[234],{"type":31,"value":235},"一、需求说明要写成任务单，不要写成愿望",{"type":26,"tag":27,"props":237,"children":238},{},[239],{"type":31,"value":240},"“帮我优化页面”太泛，“把首页首屏 CTA 文案改得更清楚，并保持现有布局不变”才是任务。",{"type":26,"tag":27,"props":242,"children":243},{},[244],{"type":31,"value":245},"推荐模板：",{"type":26,"tag":247,"props":248,"children":252},"pre",{"className":249,"code":251,"language":31,"meta":7},[250],"language-text","目标：要解决的具体问题是什么。\n范围：只允许查看和修改哪些目录或文件。\n约束：不新增依赖，不改公共接口，不做无关重构。\n验收：完成后我如何确认它是对的。\n输出：先给文件清单和修改计划，再改代码。\n",[253],{"type":26,"tag":254,"props":255,"children":256},"code",{"__ignoreMap":7},[257],{"type":31,"value":251},{"type":26,"tag":27,"props":259,"children":260},{},[261],{"type":31,"value":262},"这个模板的价值不在格式漂亮，而在减少 AI 自行脑补。",{"type":26,"tag":91,"props":264,"children":266},{"id":265},"二先做文件定位再让它修改",[267],{"type":31,"value":268},"二、先做文件定位，再让它修改",{"type":26,"tag":27,"props":270,"children":271},{},[272],{"type":31,"value":273},"真实项目里，改错文件比写错代码更常见。一个稳妥流程是：",{"type":26,"tag":39,"props":275,"children":276},{},[277,282,287,292],{"type":26,"tag":43,"props":278,"children":279},{},[280],{"type":31,"value":281},"让 Cursor 只读分析相关文件",{"type":26,"tag":43,"props":283,"children":284},{},[285],{"type":31,"value":286},"要求列出候选文件和判断理由",{"type":26,"tag":43,"props":288,"children":289},{},[290],{"type":31,"value":291},"人工确认范围",{"type":26,"tag":43,"props":293,"children":294},{},[295],{"type":31,"value":296},"再进入修改阶段",{"type":26,"tag":27,"props":298,"children":299},{},[300],{"type":31,"value":301},"示例提示词：",{"type":26,"tag":247,"props":303,"children":306},{"className":304,"code":305,"language":31,"meta":7},[250],"请定位“保存按钮点击后没有提示”的相关代码。只列出文件、函数和数据流，不要修改。请说明每个候选文件为什么相关。\n",[307],{"type":26,"tag":254,"props":308,"children":309},{"__ignoreMap":7},[310],{"type":31,"value":305},{"type":26,"tag":27,"props":312,"children":313},{},[314],{"type":31,"value":315},"这一步能把大量风险挡在改动之前。",{"type":26,"tag":91,"props":317,"children":319},{"id":318},"三小步修改每轮只解决一个可验证问题",[320],{"type":31,"value":321},"三、小步修改：每轮只解决一个可验证问题",{"type":26,"tag":27,"props":323,"children":324},{},[325],{"type":31,"value":326},"一次让 Cursor 做太多事，会让 Review 变成灾难。更好的方式是把任务拆成小步：",{"type":26,"tag":103,"props":328,"children":329},{},[330,351],{"type":26,"tag":107,"props":331,"children":332},{},[333],{"type":26,"tag":111,"props":334,"children":335},{},[336,341,346],{"type":26,"tag":115,"props":337,"children":338},{},[339],{"type":31,"value":340},"步骤",{"type":26,"tag":115,"props":342,"children":343},{},[344],{"type":31,"value":345},"目标",{"type":26,"tag":115,"props":347,"children":348},{},[349],{"type":31,"value":350},"验证方式",{"type":26,"tag":131,"props":352,"children":353},{},[354,372,390,408,426],{"type":26,"tag":111,"props":355,"children":356},{},[357,362,367],{"type":26,"tag":138,"props":358,"children":359},{},[360],{"type":31,"value":361},"1",{"type":26,"tag":138,"props":363,"children":364},{},[365],{"type":31,"value":366},"定位入口和状态来源",{"type":26,"tag":138,"props":368,"children":369},{},[370],{"type":31,"value":371},"文件清单与数据流说明",{"type":26,"tag":111,"props":373,"children":374},{},[375,380,385],{"type":26,"tag":138,"props":376,"children":377},{},[378],{"type":31,"value":379},"2",{"type":26,"tag":138,"props":381,"children":382},{},[383],{"type":31,"value":384},"修复最小逻辑",{"type":26,"tag":138,"props":386,"children":387},{},[388],{"type":31,"value":389},"单个交互手测",{"type":26,"tag":111,"props":391,"children":392},{},[393,398,403],{"type":26,"tag":138,"props":394,"children":395},{},[396],{"type":31,"value":397},"3",{"type":26,"tag":138,"props":399,"children":400},{},[401],{"type":31,"value":402},"补充边界处理",{"type":26,"tag":138,"props":404,"children":405},{},[406],{"type":31,"value":407},"错误态、空态、加载态",{"type":26,"tag":111,"props":409,"children":410},{},[411,416,421],{"type":26,"tag":138,"props":412,"children":413},{},[414],{"type":31,"value":415},"4",{"type":26,"tag":138,"props":417,"children":418},{},[419],{"type":31,"value":420},"增加测试或检查",{"type":26,"tag":138,"props":422,"children":423},{},[424],{"type":31,"value":425},"lint、typecheck、单测",{"type":26,"tag":111,"props":427,"children":428},{},[429,434,439],{"type":26,"tag":138,"props":430,"children":431},{},[432],{"type":31,"value":433},"5",{"type":26,"tag":138,"props":435,"children":436},{},[437],{"type":31,"value":438},"Review 与整理",{"type":26,"tag":138,"props":440,"children":441},{},[442],{"type":31,"value":443},"diff 审查、无关改动清理",{"type":26,"tag":27,"props":445,"children":446},{},[447],{"type":31,"value":448},"小步并不慢。它减少的是返工、回滚和“看不懂 AI 到底改了什么”的时间。",{"type":26,"tag":91,"props":450,"children":452},{"id":451},"四验证要前置不要等改完才想怎么测",[453],{"type":31,"value":454},"四、验证要前置，不要等改完才想怎么测",{"type":26,"tag":27,"props":456,"children":457},{},[458],{"type":31,"value":459},"Cursor 生成代码后最常见的问题，是看起来合理，但没有覆盖边界。每个任务开始前就应该写验收标准：",{"type":26,"tag":461,"props":462,"children":463},"ul",{},[464,469,474,479,484],{"type":26,"tag":43,"props":465,"children":466},{},[467],{"type":31,"value":468},"正常路径是否成功",{"type":26,"tag":43,"props":470,"children":471},{},[472],{"type":31,"value":473},"空数据是否有表现",{"type":26,"tag":43,"props":475,"children":476},{},[477],{"type":31,"value":478},"错误返回是否可见",{"type":26,"tag":43,"props":480,"children":481},{},[482],{"type":31,"value":483},"移动端或小屏是否破坏布局",{"type":26,"tag":43,"props":485,"children":486},{},[487],{"type":31,"value":488},"类型、lint、测试是否通过",{"type":26,"tag":27,"props":490,"children":491},{},[492],{"type":31,"value":493},"对于前端页面，手动验收可以写成：",{"type":26,"tag":247,"props":495,"children":498},{"className":496,"code":497,"language":31,"meta":7},[250],"验收步骤：\n1. 打开页面 A\n2. 输入有效内容并提交，应出现成功提示\n3. 输入空内容并提交，应出现字段错误\n4. 刷新页面后状态不应错误保留\n5. 移动端宽度下按钮和提示不应重叠\n",[499],{"type":26,"tag":254,"props":500,"children":501},{"__ignoreMap":7},[502],{"type":31,"value":497},{"type":26,"tag":27,"props":504,"children":505},{},[506],{"type":31,"value":507},"Cursor 能根据这些标准写代码，也能根据这些标准帮助你检查。",{"type":26,"tag":91,"props":509,"children":511},{"id":510},"五review-时重点看-6-类副作用",[512],{"type":31,"value":513},"五、Review 时重点看 6 类副作用",{"type":26,"tag":27,"props":515,"children":516},{},[517],{"type":31,"value":518},"不要只看“功能能不能跑”。AI 修改最容易带来的副作用包括：",{"type":26,"tag":39,"props":520,"children":521},{},[522,527,532,537,542,547],{"type":26,"tag":43,"props":523,"children":524},{},[525],{"type":31,"value":526},"顺手改了无关命名",{"type":26,"tag":43,"props":528,"children":529},{},[530],{"type":31,"value":531},"新增了不必要依赖",{"type":26,"tag":43,"props":533,"children":534},{},[535],{"type":31,"value":536},"把局部逻辑提升成过度抽象",{"type":26,"tag":43,"props":538,"children":539},{},[540],{"type":31,"value":541},"忽略了异常状态",{"type":26,"tag":43,"props":543,"children":544},{},[545],{"type":31,"value":546},"修改了公共组件默认行为",{"type":26,"tag":43,"props":548,"children":549},{},[550],{"type":31,"value":551},"删除了看似无用但实际被依赖的兼容代码",{"type":26,"tag":27,"props":553,"children":554},{},[555],{"type":31,"value":556},"Review 时可以直接问 Cursor：",{"type":26,"tag":247,"props":558,"children":561},{"className":559,"code":560,"language":31,"meta":7},[250],"请基于当前 diff 列出潜在副作用，重点检查公共组件、类型定义、路由、接口参数和样式影响范围。\n",[562],{"type":26,"tag":254,"props":563,"children":564},{"__ignoreMap":7},[565],{"type":31,"value":560},{"type":26,"tag":27,"props":567,"children":568},{},[569],{"type":31,"value":570},"但最终判断仍然应该由人完成。",{"type":26,"tag":91,"props":572,"children":574},{"id":573},"六失败案例一句帮我优化表单为什么会失控",[575],{"type":31,"value":576},"六、失败案例：一句“帮我优化表单”为什么会失控",{"type":26,"tag":27,"props":578,"children":579},{},[580],{"type":31,"value":581},"某个团队让 AI 优化一个报名表单，结果它同时改了字段结构、校验规则、按钮样式和提交接口。页面看起来更完整，但后端接收字段变了，线上提交失败。",{"type":26,"tag":27,"props":583,"children":584},{},[585],{"type":31,"value":586},"根因不是 Cursor 不能用，而是任务没有边界：",{"type":26,"tag":461,"props":588,"children":589},{},[590,595,600,605],{"type":26,"tag":43,"props":591,"children":592},{},[593],{"type":31,"value":594},"没有限定只改前端提示",{"type":26,"tag":43,"props":596,"children":597},{},[598],{"type":31,"value":599},"没有禁止接口参数变更",{"type":26,"tag":43,"props":601,"children":602},{},[603],{"type":31,"value":604},"没有给出验收用例",{"type":26,"tag":43,"props":606,"children":607},{},[608],{"type":31,"value":609},"没有先看 diff 里的公共影响",{"type":26,"tag":27,"props":611,"children":612},{},[613],{"type":31,"value":614},"修复方式是把任务拆成两轮：先只改错误提示文案和字段状态，再单独评估是否要调整接口。",{"type":26,"tag":91,"props":616,"children":618},{"id":617},"七cursor-真实项目-checklist",[619],{"type":31,"value":620},"七、Cursor 真实项目 Checklist",{"type":26,"tag":461,"props":622,"children":625},{"className":623},[624],"contains-task-list",[626,639,648,657,666,675,684],{"type":26,"tag":43,"props":627,"children":630},{"className":628},[629],"task-list-item",[631,637],{"type":26,"tag":632,"props":633,"children":636},"input",{"disabled":634,"type":635},true,"checkbox",[],{"type":31,"value":638}," 需求已写成目标、范围、约束、验收",{"type":26,"tag":43,"props":640,"children":642},{"className":641},[629],[643,646],{"type":26,"tag":632,"props":644,"children":645},{"disabled":634,"type":635},[],{"type":31,"value":647}," 修改前已完成文件定位",{"type":26,"tag":43,"props":649,"children":651},{"className":650},[629],[652,655],{"type":26,"tag":632,"props":653,"children":654},{"disabled":634,"type":635},[],{"type":31,"value":656}," 每轮只处理一个可验证问题",{"type":26,"tag":43,"props":658,"children":660},{"className":659},[629],[661,664],{"type":26,"tag":632,"props":662,"children":663},{"disabled":634,"type":635},[],{"type":31,"value":665}," 多文件改动已拆分阶段",{"type":26,"tag":43,"props":667,"children":669},{"className":668},[629],[670,673],{"type":26,"tag":632,"props":671,"children":672},{"disabled":634,"type":635},[],{"type":31,"value":674}," 关键逻辑有测试或手动验收步骤",{"type":26,"tag":43,"props":676,"children":678},{"className":677},[629],[679,682],{"type":26,"tag":632,"props":680,"children":681},{"disabled":634,"type":635},[],{"type":31,"value":683}," diff 中没有无关重构",{"type":26,"tag":43,"props":685,"children":687},{"className":686},[629],[688,691],{"type":26,"tag":632,"props":689,"children":690},{"disabled":634,"type":635},[],{"type":31,"value":692}," 公共组件和接口参数已重点审查",{"type":26,"tag":91,"props":694,"children":696},{"id":695},"结语",[697],{"type":31,"value":695},{"type":26,"tag":27,"props":699,"children":700},{},[701],{"type":31,"value":702},"Cursor 真正提升效率的地方，不是让你少思考，而是把定位、修改、验证和 Review 的循环压缩得更快。只要你用任务单、边界、小步改动和验收标准管理它，它就会更像工程协作者，而不是不可控的代码生成器。",{"type":26,"tag":27,"props":704,"children":705},{},[706],{"type":31,"value":707},"延伸阅读：",{"type":26,"tag":461,"props":709,"children":710},{},[711,718,727,736],{"type":26,"tag":43,"props":712,"children":713},{},[714],{"type":26,"tag":74,"props":715,"children":716},{"href":84},[717],{"type":31,"value":87},{"type":26,"tag":43,"props":719,"children":720},{},[721],{"type":26,"tag":74,"props":722,"children":724},{"href":723},"/topics/ai/cursor-safe-multi-file-changes",[725],{"type":31,"value":726},"Cursor 多文件改动安全策略",{"type":26,"tag":43,"props":728,"children":729},{},[730],{"type":26,"tag":74,"props":731,"children":733},{"href":732},"/topics/ai/cursor-code-review-prompts",[734],{"type":31,"value":735},"Cursor 代码审查提示词",{"type":26,"tag":43,"props":737,"children":738},{},[739],{"type":26,"tag":74,"props":740,"children":742},{"href":741},"/topics/ai/cursor-bug-debugging-from-diff-to-root-cause",[743],{"type":31,"value":744},"Cursor 生成 bug 的定位方法",{"title":7,"searchDepth":746,"depth":746,"links":747},3,[748,750,751,752,753,754,755,756,757],{"id":93,"depth":749,"text":96},2,{"id":232,"depth":749,"text":235},{"id":265,"depth":749,"text":268},{"id":318,"depth":749,"text":321},{"id":451,"depth":749,"text":454},{"id":510,"depth":749,"text":513},{"id":573,"depth":749,"text":576},{"id":617,"depth":749,"text":620},{"id":695,"depth":749,"text":695},"markdown","content:topics:ai:cursor-real-project-workflow-from-brief-to-review.md","content","topics/ai/cursor-real-project-workflow-from-brief-to-review.md","topics/ai/cursor-real-project-workflow-from-brief-to-review","md",[765,1917,2865],{"_path":766,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":767,"description":768,"date":769,"topic":5,"author":11,"tags":770,"image":775,"imageAlt":776,"pexelsPhotoId":777,"pexelsUrl":778,"readingTime":779,"body":780,"_type":758,"_id":1914,"_source":760,"_file":1915,"_stem":1916,"_extension":763},"/topics/ai/cursor-keyboard-shortcuts-cheatsheet","Cursor 快捷键速查表（macOS/Windows）：从“会用”到“能提效”的 10 个工作流","把 Cursor 常用快捷键按任务分组（查代码、改代码、多文件、对话、审查与回滚），给出可直接照抄的工作流与最小回归清单，避免“快捷键背了也没变快”。","2026-03-02",[13,771,772,773,774],"快捷键","AI IDE","VS Code","开发效率","/images/topics/ai/cursor-keyboard-shortcuts-cheatsheet.jpg","彩色机械键盘与鼠标的工作台面",34563105,"https://www.pexels.com/photo/colorful-mechanical-keyboard-and-mouse-setup-34563105/",12,{"type":23,"children":781,"toc":1888},[782,787,805,810,838,843,878,882,888,893,926,931,954,957,963,968,1186,1195,1198,1204,1211,1230,1238,1259,1264,1270,1285,1316,1321,1334,1340,1359,1377,1385,1390,1396,1401,1422,1430,1436,1441,1464,1469,1475,1488,1494,1512,1530,1536,1547,1565,1571,1582,1588,1593,1636,1639,1645,1653,1706,1709,1715,1721,1726,1731,1754,1772,1777,1802,1805,1811,1817,1822,1828,1833,1839,1844,1847,1853],{"type":26,"tag":27,"props":783,"children":784},{},[785],{"type":31,"value":786},"如果你在搜“Cursor 快捷键”，你大概率不是想背一张表，而是想解决这类问题：",{"type":26,"tag":461,"props":788,"children":789},{},[790,795,800],{"type":26,"tag":43,"props":791,"children":792},{},[793],{"type":31,"value":794},"为什么我用了 AI，还是很慢？（对话来回太多、改动不可控）",{"type":26,"tag":43,"props":796,"children":797},{},[798],{"type":31,"value":799},"为什么它“看起来懂了”，却改错文件/改出回归？（上下文与范围没锁住）",{"type":26,"tag":43,"props":801,"children":802},{},[803],{"type":31,"value":804},"多文件改动怎么做得安全？（验收、回滚、最小回归集）",{"type":26,"tag":27,"props":806,"children":807},{},[808],{"type":31,"value":809},"这篇文章给你两份东西：",{"type":26,"tag":39,"props":811,"children":812},{},[813,826],{"type":26,"tag":43,"props":814,"children":815},{},[816,818,824],{"type":31,"value":817},"一张",{"type":26,"tag":819,"props":820,"children":821},"strong",{},[822],{"type":31,"value":823},"按任务分组",{"type":31,"value":825},"的快捷键表（不是按功能堆在一起）",{"type":26,"tag":43,"props":827,"children":828},{},[829,831,836],{"type":31,"value":830},"一套“从需求到落地”的",{"type":26,"tag":819,"props":832,"children":833},{},[834],{"type":31,"value":835},"最小闭环工作流",{"type":31,"value":837},"（每一步都有快捷键）",{"type":26,"tag":27,"props":839,"children":840},{},[841],{"type":31,"value":842},"想看系统玩法：",{"type":26,"tag":461,"props":844,"children":845},{},[846,856,867],{"type":26,"tag":43,"props":847,"children":848},{},[849,851],{"type":31,"value":850},"入门教程看：",{"type":26,"tag":74,"props":852,"children":853},{"href":76},[854],{"type":31,"value":855},"Cursor 使用教程（2026）",{"type":26,"tag":43,"props":857,"children":858},{},[859,861],{"type":31,"value":860},"进阶玩法看：",{"type":26,"tag":74,"props":862,"children":864},{"href":863},"/topics/ai/cursor-editor-guide",[865],{"type":31,"value":866},"Cursor 编辑器深度玩法",{"type":26,"tag":43,"props":868,"children":869},{},[870,872],{"type":31,"value":871},"规则与忽略看：",{"type":26,"tag":74,"props":873,"children":875},{"href":874},"/topics/ai/cursor-rules-cursorrules",[876],{"type":31,"value":877},"Cursor Rules 与 .cursorrules",{"type":26,"tag":879,"props":880,"children":881},"hr",{},[],{"type":26,"tag":91,"props":883,"children":885},{"id":884},"先给结论提效不是按得快而是闭环更短",[886],{"type":31,"value":887},"先给结论：提效不是“按得快”，而是“闭环更短”",{"type":26,"tag":27,"props":889,"children":890},{},[891],{"type":31,"value":892},"你可以把 Cursor 的快捷键理解为 3 条流水线：",{"type":26,"tag":461,"props":894,"children":895},{},[896,906,916],{"type":26,"tag":43,"props":897,"children":898},{},[899,904],{"type":26,"tag":819,"props":900,"children":901},{},[902],{"type":31,"value":903},"改一小段",{"type":31,"value":905},"（内联编辑）：把改动限制在一个函数/一段样式",{"type":26,"tag":43,"props":907,"children":908},{},[909,914],{"type":26,"tag":819,"props":910,"children":911},{},[912],{"type":31,"value":913},"改一组文件",{"type":31,"value":915},"（Composer）：把改动限制在一组明确文件，并要求输出 diff + 验收点",{"type":26,"tag":43,"props":917,"children":918},{},[919,924],{"type":26,"tag":819,"props":920,"children":921},{},[922],{"type":31,"value":923},"聊清楚再动手",{"type":31,"value":925},"（侧边对话）：先对齐目标、范围、验收、回滚",{"type":26,"tag":27,"props":927,"children":928},{},[929],{"type":31,"value":930},"当你觉得“它乱改/改太大”时，往往不是快捷键没记住，而是缺了两件事：",{"type":26,"tag":461,"props":932,"children":933},{},[934,944],{"type":26,"tag":43,"props":935,"children":936},{},[937,939],{"type":31,"value":938},"没有在动手前锁定",{"type":26,"tag":819,"props":940,"children":941},{},[942],{"type":31,"value":943},"范围",{"type":26,"tag":43,"props":945,"children":946},{},[947,949],{"type":31,"value":948},"没有在接受改动前准备",{"type":26,"tag":819,"props":950,"children":951},{},[952],{"type":31,"value":953},"验收/回滚",{"type":26,"tag":879,"props":955,"children":956},{},[],{"type":26,"tag":91,"props":958,"children":960},{"id":959},"快捷键速查表按任务分组",[961],{"type":31,"value":962},"快捷键速查表（按任务分组）",{"type":26,"tag":27,"props":964,"children":965},{},[966],{"type":31,"value":967},"说明：下表按“你正在做什么”组织，而不是按“功能名字”组织。不同版本快捷键可能略有差异，但核心逻辑一致。",{"type":26,"tag":103,"props":969,"children":970},{},[971,997],{"type":26,"tag":107,"props":972,"children":973},{},[974],{"type":26,"tag":111,"props":975,"children":976},{},[977,982,987,992],{"type":26,"tag":115,"props":978,"children":979},{},[980],{"type":31,"value":981},"任务",{"type":26,"tag":115,"props":983,"children":984},{},[985],{"type":31,"value":986},"macOS",{"type":26,"tag":115,"props":988,"children":989},{},[990],{"type":31,"value":991},"Windows",{"type":26,"tag":115,"props":993,"children":994},{},[995],{"type":31,"value":996},"你该在什么时候用",{"type":26,"tag":131,"props":998,"children":999},{},[1000,1031,1062,1093,1124,1155],{"type":26,"tag":111,"props":1001,"children":1002},{},[1003,1008,1017,1026],{"type":26,"tag":138,"props":1004,"children":1005},{},[1006],{"type":31,"value":1007},"改一小段（最安全）",{"type":26,"tag":138,"props":1009,"children":1010},{},[1011],{"type":26,"tag":254,"props":1012,"children":1014},{"className":1013},[],[1015],{"type":31,"value":1016},"Cmd + K",{"type":26,"tag":138,"props":1018,"children":1019},{},[1020],{"type":26,"tag":254,"props":1021,"children":1023},{"className":1022},[],[1024],{"type":31,"value":1025},"Ctrl + K",{"type":26,"tag":138,"props":1027,"children":1028},{},[1029],{"type":31,"value":1030},"只想改一个函数/一段 CSS，不想动别的",{"type":26,"tag":111,"props":1032,"children":1033},{},[1034,1039,1048,1057],{"type":26,"tag":138,"props":1035,"children":1036},{},[1037],{"type":31,"value":1038},"打开 AI 对话（先对齐再动手）",{"type":26,"tag":138,"props":1040,"children":1041},{},[1042],{"type":26,"tag":254,"props":1043,"children":1045},{"className":1044},[],[1046],{"type":31,"value":1047},"Cmd + L",{"type":26,"tag":138,"props":1049,"children":1050},{},[1051],{"type":26,"tag":254,"props":1052,"children":1054},{"className":1053},[],[1055],{"type":31,"value":1056},"Ctrl + L",{"type":26,"tag":138,"props":1058,"children":1059},{},[1060],{"type":31,"value":1061},"需要澄清目标、制定步骤、给验收点",{"type":26,"tag":111,"props":1063,"children":1064},{},[1065,1070,1079,1088],{"type":26,"tag":138,"props":1066,"children":1067},{},[1068],{"type":31,"value":1069},"多文件编辑（有组织地改一组文件）",{"type":26,"tag":138,"props":1071,"children":1072},{},[1073],{"type":26,"tag":254,"props":1074,"children":1076},{"className":1075},[],[1077],{"type":31,"value":1078},"Cmd + I",{"type":26,"tag":138,"props":1080,"children":1081},{},[1082],{"type":26,"tag":254,"props":1083,"children":1085},{"className":1084},[],[1086],{"type":31,"value":1087},"Ctrl + I",{"type":26,"tag":138,"props":1089,"children":1090},{},[1091],{"type":31,"value":1092},"改动涉及多个文件：组件+样式+测试",{"type":26,"tag":111,"props":1094,"children":1095},{},[1096,1101,1110,1119],{"type":26,"tag":138,"props":1097,"children":1098},{},[1099],{"type":31,"value":1100},"把选中代码加入对话上下文",{"type":26,"tag":138,"props":1102,"children":1103},{},[1104],{"type":26,"tag":254,"props":1105,"children":1107},{"className":1106},[],[1108],{"type":31,"value":1109},"Cmd + Shift + L",{"type":26,"tag":138,"props":1111,"children":1112},{},[1113],{"type":26,"tag":254,"props":1114,"children":1116},{"className":1115},[],[1117],{"type":31,"value":1118},"Ctrl + Shift + L",{"type":26,"tag":138,"props":1120,"children":1121},{},[1122],{"type":31,"value":1123},"让 AI 只看你选的片段（降低噪音）",{"type":26,"tag":111,"props":1125,"children":1126},{},[1127,1132,1141,1150],{"type":26,"tag":138,"props":1128,"children":1129},{},[1130],{"type":31,"value":1131},"接受当前建议",{"type":26,"tag":138,"props":1133,"children":1134},{},[1135],{"type":26,"tag":254,"props":1136,"children":1138},{"className":1137},[],[1139],{"type":31,"value":1140},"Cmd + Y",{"type":26,"tag":138,"props":1142,"children":1143},{},[1144],{"type":26,"tag":254,"props":1145,"children":1147},{"className":1146},[],[1148],{"type":31,"value":1149},"Ctrl + Y",{"type":26,"tag":138,"props":1151,"children":1152},{},[1153],{"type":31,"value":1154},"你已经准备好验收/回滚，并确认改动范围",{"type":26,"tag":111,"props":1156,"children":1157},{},[1158,1163,1172,1181],{"type":26,"tag":138,"props":1159,"children":1160},{},[1161],{"type":31,"value":1162},"拒绝当前建议",{"type":26,"tag":138,"props":1164,"children":1165},{},[1166],{"type":26,"tag":254,"props":1167,"children":1169},{"className":1168},[],[1170],{"type":31,"value":1171},"Cmd + N",{"type":26,"tag":138,"props":1173,"children":1174},{},[1175],{"type":26,"tag":254,"props":1176,"children":1178},{"className":1177},[],[1179],{"type":31,"value":1180},"Ctrl + N",{"type":26,"tag":138,"props":1182,"children":1183},{},[1184],{"type":31,"value":1185},"改得太大、改错方向，立刻收手",{"type":26,"tag":1187,"props":1188,"children":1189},"blockquote",{},[1190],{"type":26,"tag":27,"props":1191,"children":1192},{},[1193],{"type":31,"value":1194},"小技巧：把“改一小段”当默认路径。只有当你能清晰写出“会改哪几类文件、怎么验收”时再进入多文件。",{"type":26,"tag":879,"props":1196,"children":1197},{},[],{"type":26,"tag":91,"props":1199,"children":1201},{"id":1200},"_10-个可直接照抄的提效工作流每个都能闭环",[1202],{"type":31,"value":1203},"10 个可直接照抄的提效工作流（每个都能闭环）",{"type":26,"tag":1205,"props":1206,"children":1208},"h3",{"id":1207},"工作流-1需求计划小步改新手最稳",[1209],{"type":31,"value":1210},"工作流 1：需求→计划→小步改（新手最稳）",{"type":26,"tag":39,"props":1212,"children":1213},{},[1214,1225],{"type":26,"tag":43,"props":1215,"children":1216},{},[1217,1223],{"type":26,"tag":254,"props":1218,"children":1220},{"className":1219},[],[1221],{"type":31,"value":1222},"Cmd/Ctrl + L",{"type":31,"value":1224}," 打开对话",{"type":26,"tag":43,"props":1226,"children":1227},{},[1228],{"type":31,"value":1229},"先发这段（可复制）：",{"type":26,"tag":1187,"props":1231,"children":1232},{},[1233],{"type":26,"tag":27,"props":1234,"children":1235},{},[1236],{"type":31,"value":1237},"目标：……\n范围：只修改以下文件/模块：……\n非目标：……（明确不做）\n验收：……（可测试/可手动检查）\n输出格式：先给计划，再逐步执行；每一步写出 diff 摘要。",{"type":26,"tag":39,"props":1239,"children":1240},{"start":746},[1241,1246],{"type":26,"tag":43,"props":1242,"children":1243},{},[1244],{"type":31,"value":1245},"让 AI 先给“计划（3~6 步）”，你确认后再执行",{"type":26,"tag":43,"props":1247,"children":1248},{},[1249,1251,1257],{"type":31,"value":1250},"任何一步涉及改代码：优先回到编辑区，选中片段用 ",{"type":26,"tag":254,"props":1252,"children":1254},{"className":1253},[],[1255],{"type":31,"value":1256},"Cmd/Ctrl + K",{"type":31,"value":1258}," 小步改",{"type":26,"tag":27,"props":1260,"children":1261},{},[1262],{"type":31,"value":1263},"为什么有效：你把“想法”变成了“可执行约束”，这就是 GEO（面向 AI/模型的可理解结构）。",{"type":26,"tag":1205,"props":1265,"children":1267},{"id":1266},"工作流-2只改一个函数高频低风险",[1268],{"type":31,"value":1269},"工作流 2：只改一个函数（高频、低风险）",{"type":26,"tag":461,"props":1271,"children":1272},{},[1273],{"type":26,"tag":43,"props":1274,"children":1275},{},[1276,1278,1283],{"type":31,"value":1277},"选中函数 → ",{"type":26,"tag":254,"props":1279,"children":1281},{"className":1280},[],[1282],{"type":31,"value":1256},{"type":31,"value":1284}," → 输入指令：",{"type":26,"tag":1187,"props":1286,"children":1287},{},[1288,1293],{"type":26,"tag":27,"props":1289,"children":1290},{},[1291],{"type":31,"value":1292},"把这段改成更可读：",{"type":26,"tag":461,"props":1294,"children":1295},{},[1296,1301,1306,1311],{"type":26,"tag":43,"props":1297,"children":1298},{},[1299],{"type":31,"value":1300},"用 async/await",{"type":26,"tag":43,"props":1302,"children":1303},{},[1304],{"type":31,"value":1305},"错误处理不要吞掉",{"type":26,"tag":43,"props":1307,"children":1308},{},[1309],{"type":31,"value":1310},"添加类型（若可推断）",{"type":26,"tag":43,"props":1312,"children":1313},{},[1314],{"type":31,"value":1315},"不要改函数签名",{"type":26,"tag":27,"props":1317,"children":1318},{},[1319],{"type":31,"value":1320},"验收方式（强制）：",{"type":26,"tag":461,"props":1322,"children":1323},{},[1324,1329],{"type":26,"tag":43,"props":1325,"children":1326},{},[1327],{"type":31,"value":1328},"输出前后函数行为一致（输入/输出）",{"type":26,"tag":43,"props":1330,"children":1331},{},[1332],{"type":31,"value":1333},"失败分支有可观测日志（不要悄悄 return null）",{"type":26,"tag":1205,"props":1335,"children":1337},{"id":1336},"工作流-3多文件改动先定文件清单",[1338],{"type":31,"value":1339},"工作流 3：多文件改动（先定“文件清单”）",{"type":26,"tag":39,"props":1341,"children":1342},{},[1343,1354],{"type":26,"tag":43,"props":1344,"children":1345},{},[1346,1352],{"type":26,"tag":254,"props":1347,"children":1349},{"className":1348},[],[1350],{"type":31,"value":1351},"Cmd/Ctrl + I",{"type":31,"value":1353}," 进入多文件",{"type":26,"tag":43,"props":1355,"children":1356},{},[1357],{"type":31,"value":1358},"先让 AI 输出：",{"type":26,"tag":461,"props":1360,"children":1361},{},[1362,1367,1372],{"type":26,"tag":43,"props":1363,"children":1364},{},[1365],{"type":31,"value":1366},"预计会改哪些文件（最多 5 个）",{"type":26,"tag":43,"props":1368,"children":1369},{},[1370],{"type":31,"value":1371},"每个文件改什么",{"type":26,"tag":43,"props":1373,"children":1374},{},[1375],{"type":31,"value":1376},"每一步怎么验收",{"type":26,"tag":39,"props":1378,"children":1379},{"start":746},[1380],{"type":26,"tag":43,"props":1381,"children":1382},{},[1383],{"type":31,"value":1384},"你确认文件清单后再开始生成改动",{"type":26,"tag":27,"props":1386,"children":1387},{},[1388],{"type":31,"value":1389},"关键点：多文件最容易翻车的是“它把你没想到的文件也改了”。所以文件清单是第一道闸门。",{"type":26,"tag":1205,"props":1391,"children":1393},{"id":1392},"工作流-4把上下文噪音砍掉防跑偏",[1394],{"type":31,"value":1395},"工作流 4：把“上下文噪音”砍掉（防跑偏）",{"type":26,"tag":27,"props":1397,"children":1398},{},[1399],{"type":31,"value":1400},"当你怀疑它在胡说/乱改时：",{"type":26,"tag":461,"props":1402,"children":1403},{},[1404,1417],{"type":26,"tag":43,"props":1405,"children":1406},{},[1407,1409,1415],{"type":31,"value":1408},"只选择关键代码片段 → ",{"type":26,"tag":254,"props":1410,"children":1412},{"className":1411},[],[1413],{"type":31,"value":1414},"Cmd/Ctrl + Shift + L",{"type":31,"value":1416}," 加入对话",{"type":26,"tag":43,"props":1418,"children":1419},{},[1420],{"type":31,"value":1421},"然后在对话里要求：",{"type":26,"tag":1187,"props":1423,"children":1424},{},[1425],{"type":26,"tag":27,"props":1426,"children":1427},{},[1428],{"type":31,"value":1429},"只基于我提供的代码片段回答，不要假设其它文件存在。",{"type":26,"tag":1205,"props":1431,"children":1433},{"id":1432},"工作流-5生成变更说明让-code-review-变快",[1434],{"type":31,"value":1435},"工作流 5：生成变更说明（让 code review 变快）",{"type":26,"tag":27,"props":1437,"children":1438},{},[1439],{"type":31,"value":1440},"改完后在对话里让它输出：",{"type":26,"tag":461,"props":1442,"children":1443},{},[1444,1449,1454,1459],{"type":26,"tag":43,"props":1445,"children":1446},{},[1447],{"type":31,"value":1448},"改动摘要（3~7 条）",{"type":26,"tag":43,"props":1450,"children":1451},{},[1452],{"type":31,"value":1453},"风险点（依赖/边界条件）",{"type":26,"tag":43,"props":1455,"children":1456},{},[1457],{"type":31,"value":1458},"回滚方式",{"type":26,"tag":43,"props":1460,"children":1461},{},[1462],{"type":31,"value":1463},"验收步骤",{"type":26,"tag":27,"props":1465,"children":1466},{},[1467],{"type":31,"value":1468},"这套结构能直接贴进 PR 描述。",{"type":26,"tag":1205,"props":1470,"children":1472},{"id":1471},"工作流-6写最小回归集不写回归-等事故",[1473],{"type":31,"value":1474},"工作流 6：写“最小回归集”（不写回归 = 等事故）",{"type":26,"tag":27,"props":1476,"children":1477},{},[1478,1480,1486],{"type":31,"value":1479},"每次改动都至少做 10 条最小回归（见下文清单）。你可以把它写在 ",{"type":26,"tag":254,"props":1481,"children":1483},{"className":1482},[],[1484],{"type":31,"value":1485},"README",{"type":31,"value":1487}," 或团队 wiki。",{"type":26,"tag":1205,"props":1489,"children":1491},{"id":1490},"工作流-7把接受建议变成最后一步",[1492],{"type":31,"value":1493},"工作流 7：把“接受建议”变成最后一步",{"type":26,"tag":27,"props":1495,"children":1496},{},[1497,1503,1505,1510],{"type":26,"tag":254,"props":1498,"children":1500},{"className":1499},[],[1501],{"type":31,"value":1502},"Cmd/Ctrl + Y",{"type":31,"value":1504}," 应该是",{"type":26,"tag":819,"props":1506,"children":1507},{},[1508],{"type":31,"value":1509},"最后一步",{"type":31,"value":1511},"：",{"type":26,"tag":461,"props":1513,"children":1514},{},[1515,1520,1525],{"type":26,"tag":43,"props":1516,"children":1517},{},[1518],{"type":31,"value":1519},"你已经看过 diff",{"type":26,"tag":43,"props":1521,"children":1522},{},[1523],{"type":31,"value":1524},"你能说清楚“怎么验收”",{"type":26,"tag":43,"props":1526,"children":1527},{},[1528],{"type":31,"value":1529},"你知道“怎么回滚”",{"type":26,"tag":1205,"props":1531,"children":1533},{"id":1532},"工作流-8拒绝建议不是失败是风控动作",[1534],{"type":31,"value":1535},"工作流 8：拒绝建议不是失败，是风控动作",{"type":26,"tag":27,"props":1537,"children":1538},{},[1539,1545],{"type":26,"tag":254,"props":1540,"children":1542},{"className":1541},[],[1543],{"type":31,"value":1544},"Cmd/Ctrl + N",{"type":31,"value":1546}," 的使用时机：",{"type":26,"tag":461,"props":1548,"children":1549},{},[1550,1555,1560],{"type":26,"tag":43,"props":1551,"children":1552},{},[1553],{"type":31,"value":1554},"它开始改你没提过的东西（范围漂移）",{"type":26,"tag":43,"props":1556,"children":1557},{},[1558],{"type":31,"value":1559},"它改了 10 个文件但你只想改 1 个",{"type":26,"tag":43,"props":1561,"children":1562},{},[1563],{"type":31,"value":1564},"它为了“更优雅”引入新依赖/新抽象",{"type":26,"tag":1205,"props":1566,"children":1568},{"id":1567},"工作流-9重复任务做成模板提示词不是一次性",[1569],{"type":31,"value":1570},"工作流 9：重复任务做成模板（提示词不是一次性）",{"type":26,"tag":27,"props":1572,"children":1573},{},[1574,1576,1580],{"type":31,"value":1575},"把高频任务（比如“写组件+样式+验收”）固化成模板，放进 Rules（见：",{"type":26,"tag":74,"props":1577,"children":1578},{"href":874},[1579],{"type":31,"value":877},{"type":31,"value":1581},"）。",{"type":26,"tag":1205,"props":1583,"children":1585},{"id":1584},"工作流-10把快捷键表做成你自己的任务表",[1586],{"type":31,"value":1587},"工作流 10：把“快捷键表”做成你自己的任务表",{"type":26,"tag":27,"props":1589,"children":1590},{},[1591],{"type":31,"value":1592},"你不需要记住所有快捷键，只需要记住：",{"type":26,"tag":461,"props":1594,"children":1595},{},[1596,1606,1616,1626],{"type":26,"tag":43,"props":1597,"children":1598},{},[1599,1601],{"type":31,"value":1600},"小步改：",{"type":26,"tag":254,"props":1602,"children":1604},{"className":1603},[],[1605],{"type":31,"value":1256},{"type":26,"tag":43,"props":1607,"children":1608},{},[1609,1611],{"type":31,"value":1610},"先对齐：",{"type":26,"tag":254,"props":1612,"children":1614},{"className":1613},[],[1615],{"type":31,"value":1222},{"type":26,"tag":43,"props":1617,"children":1618},{},[1619,1621],{"type":31,"value":1620},"多文件：",{"type":26,"tag":254,"props":1622,"children":1624},{"className":1623},[],[1625],{"type":31,"value":1351},{"type":26,"tag":43,"props":1627,"children":1628},{},[1629,1631],{"type":31,"value":1630},"上下文聚焦：",{"type":26,"tag":254,"props":1632,"children":1634},{"className":1633},[],[1635],{"type":31,"value":1414},{"type":26,"tag":879,"props":1637,"children":1638},{},[],{"type":26,"tag":91,"props":1640,"children":1642},{"id":1641},"必交付物-1最小回归任务清单10-条通用",[1643],{"type":31,"value":1644},"必交付物 1：最小回归任务清单（10 条，通用）",{"type":26,"tag":1187,"props":1646,"children":1647},{},[1648],{"type":26,"tag":27,"props":1649,"children":1650},{},[1651],{"type":31,"value":1652},"这份清单的意义：让每次 AI 改动都能“被验证”。否则你只是把不可控变成了更快的不可控。",{"type":26,"tag":39,"props":1654,"children":1655},{},[1656,1661,1666,1671,1676,1681,1686,1691,1696,1701],{"type":26,"tag":43,"props":1657,"children":1658},{},[1659],{"type":31,"value":1660},"关键路径能跑通（手动点击/请求一次）",{"type":26,"tag":43,"props":1662,"children":1663},{},[1664],{"type":31,"value":1665},"错误路径能触发（模拟一次失败输入）",{"type":26,"tag":43,"props":1667,"children":1668},{},[1669],{"type":31,"value":1670},"控制台无新增错误（至少关注 1 次真实操作）",{"type":26,"tag":43,"props":1672,"children":1673},{},[1674],{"type":31,"value":1675},"关键 UI 未错位（移动端/桌面端各看一眼）",{"type":26,"tag":43,"props":1677,"children":1678},{},[1679],{"type":31,"value":1680},"刷新后状态正确（尤其是表单/列表）",{"type":26,"tag":43,"props":1682,"children":1683},{},[1684],{"type":31,"value":1685},"路由跳转没断（从入口到目标页）",{"type":26,"tag":43,"props":1687,"children":1688},{},[1689],{"type":31,"value":1690},"相关接口未改变契约（字段名/类型）",{"type":26,"tag":43,"props":1692,"children":1693},{},[1694],{"type":31,"value":1695},"性能没有明显退化（首屏、交互卡顿）",{"type":26,"tag":43,"props":1697,"children":1698},{},[1699],{"type":31,"value":1700},"回滚方案可执行（知道回滚哪几个文件/commit）",{"type":26,"tag":43,"props":1702,"children":1703},{},[1704],{"type":31,"value":1705},"写下“这次改动解决了什么、风险是什么”（可贴 PR）",{"type":26,"tag":879,"props":1707,"children":1708},{},[],{"type":26,"tag":91,"props":1710,"children":1712},{"id":1711},"必交付物-2失败案例复盘真实会发生",[1713],{"type":31,"value":1714},"必交付物 2：失败案例复盘（真实会发生）",{"type":26,"tag":1205,"props":1716,"children":1718},{"id":1717},"现象快捷键用得很熟但交付还是慢",[1719],{"type":31,"value":1720},"现象：快捷键用得很熟，但交付还是慢",{"type":26,"tag":27,"props":1722,"children":1723},{},[1724],{"type":31,"value":1725},"典型原因：你把 Cursor 当成“更聪明的搜索框”，不断对话，直到它给出你想要的答案。",{"type":26,"tag":27,"props":1727,"children":1728},{},[1729],{"type":31,"value":1730},"复现路径：",{"type":26,"tag":461,"props":1732,"children":1733},{},[1734,1739,1744,1749],{"type":26,"tag":43,"props":1735,"children":1736},{},[1737],{"type":31,"value":1738},"你直接说“把页面做得更好看、更高级”",{"type":26,"tag":43,"props":1740,"children":1741},{},[1742],{"type":31,"value":1743},"AI 开始大改样式、抽象组件、甚至引入新依赖",{"type":26,"tag":43,"props":1745,"children":1746},{},[1747],{"type":31,"value":1748},"你为了省事按了“接受建议”",{"type":26,"tag":43,"props":1750,"children":1751},{},[1752],{"type":31,"value":1753},"最后发现：设计没统一、移动端崩、甚至埋了性能问题",{"type":26,"tag":27,"props":1755,"children":1756},{},[1757,1759,1763,1765,1770],{"type":31,"value":1758},"根因：缺少",{"type":26,"tag":819,"props":1760,"children":1761},{},[1762],{"type":31,"value":943},{"type":31,"value":1764},"与",{"type":26,"tag":819,"props":1766,"children":1767},{},[1768],{"type":31,"value":1769},"验收",{"type":31,"value":1771},"。",{"type":26,"tag":27,"props":1773,"children":1774},{},[1775],{"type":31,"value":1776},"修复方式（可照抄）：",{"type":26,"tag":461,"props":1778,"children":1779},{},[1780,1785,1797],{"type":26,"tag":43,"props":1781,"children":1782},{},[1783],{"type":31,"value":1784},"把需求拆成 3 个可验证目标：例如“按钮样式统一”“首屏 CTA 更明显”“移动端间距不挤”",{"type":26,"tag":43,"props":1786,"children":1787},{},[1788,1790,1795],{"type":31,"value":1789},"每个目标只用 ",{"type":26,"tag":254,"props":1791,"children":1793},{"className":1792},[],[1794],{"type":31,"value":1256},{"type":31,"value":1796}," 改一个局部",{"type":26,"tag":43,"props":1798,"children":1799},{},[1800],{"type":31,"value":1801},"每次接受建议前跑一遍“最小回归集”",{"type":26,"tag":879,"props":1803,"children":1804},{},[],{"type":26,"tag":91,"props":1806,"children":1808},{"id":1807},"faq高频问题",[1809],{"type":31,"value":1810},"FAQ（高频问题）",{"type":26,"tag":1205,"props":1812,"children":1814},{"id":1813},"q1我应该先记快捷键还是先学工作流",[1815],{"type":31,"value":1816},"Q1：我应该先记快捷键还是先学工作流？",{"type":26,"tag":27,"props":1818,"children":1819},{},[1820],{"type":31,"value":1821},"先学工作流。快捷键只是把工作流的步骤变短。",{"type":26,"tag":1205,"props":1823,"children":1825},{"id":1824},"q2为什么我一用多文件就容易翻车",[1826],{"type":31,"value":1827},"Q2：为什么我一用多文件就容易翻车？",{"type":26,"tag":27,"props":1829,"children":1830},{},[1831],{"type":31,"value":1832},"因为多文件意味着范围更大、依赖更多、验收更难。先锁定“文件清单 + 每步验收”，再让它动手。",{"type":26,"tag":1205,"props":1834,"children":1836},{"id":1835},"q3有没有万能提示词",[1837],{"type":31,"value":1838},"Q3：有没有“万能提示词”？",{"type":26,"tag":27,"props":1840,"children":1841},{},[1842],{"type":31,"value":1843},"没有，但有“万能结构”：目标、范围、非目标、验收、输出格式。",{"type":26,"tag":879,"props":1845,"children":1846},{},[],{"type":26,"tag":91,"props":1848,"children":1850},{"id":1849},"延伸阅读建议按顺序",[1851],{"type":31,"value":1852},"延伸阅读（建议按顺序）",{"type":26,"tag":461,"props":1854,"children":1855},{},[1856,1863,1870,1877],{"type":26,"tag":43,"props":1857,"children":1858},{},[1859],{"type":26,"tag":74,"props":1860,"children":1861},{"href":76},[1862],{"type":31,"value":855},{"type":26,"tag":43,"props":1864,"children":1865},{},[1866],{"type":26,"tag":74,"props":1867,"children":1868},{"href":863},[1869],{"type":31,"value":866},{"type":26,"tag":43,"props":1871,"children":1872},{},[1873],{"type":26,"tag":74,"props":1874,"children":1875},{"href":874},[1876],{"type":31,"value":877},{"type":26,"tag":43,"props":1878,"children":1879},{},[1880,1882],{"type":31,"value":1881},"如果你更关心“网页制作落地”：看这篇 ",{"type":26,"tag":74,"props":1883,"children":1885},{"href":1884},"/topics/practical-tips/htmlpage-quick-landing-page",[1886],{"type":31,"value":1887},"3 分钟用 HTMLPAGE 做落地页",{"title":7,"searchDepth":746,"depth":746,"links":1889},[1890,1891,1892,1904,1905,1908,1913],{"id":884,"depth":749,"text":887},{"id":959,"depth":749,"text":962},{"id":1200,"depth":749,"text":1203,"children":1893},[1894,1895,1896,1897,1898,1899,1900,1901,1902,1903],{"id":1207,"depth":746,"text":1210},{"id":1266,"depth":746,"text":1269},{"id":1336,"depth":746,"text":1339},{"id":1392,"depth":746,"text":1395},{"id":1432,"depth":746,"text":1435},{"id":1471,"depth":746,"text":1474},{"id":1490,"depth":746,"text":1493},{"id":1532,"depth":746,"text":1535},{"id":1567,"depth":746,"text":1570},{"id":1584,"depth":746,"text":1587},{"id":1641,"depth":749,"text":1644},{"id":1711,"depth":749,"text":1714,"children":1906},[1907],{"id":1717,"depth":746,"text":1720},{"id":1807,"depth":749,"text":1810,"children":1909},[1910,1911,1912],{"id":1813,"depth":746,"text":1816},{"id":1824,"depth":746,"text":1827},{"id":1835,"depth":746,"text":1838},{"id":1849,"depth":749,"text":1852},"content:topics:ai:cursor-keyboard-shortcuts-cheatsheet.md","topics/ai/cursor-keyboard-shortcuts-cheatsheet.md","topics/ai/cursor-keyboard-shortcuts-cheatsheet",{"_path":1918,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1919,"description":1920,"date":1921,"topic":5,"author":11,"tags":1922,"image":1925,"imageAlt":1926,"pexelsPhotoId":1927,"pexelsUrl":1928,"readingTime":1929,"body":1930,"_type":758,"_id":2862,"_source":760,"_file":2863,"_stem":2864,"_extension":763},"/topics/ai/cursor-vs-copilot-vscode-workflow","Cursor vs GitHub Copilot vs VS Code：怎么选、怎么搭配、怎么把风险关在笼子里","用“任务类型×风险×验收成本”的选择矩阵解释 Cursor/Copilot/VS Code 的差异，并给出一套可落地的协作工作流（范围闸门、最小回归集、回滚策略）。","2026-03-01",[13,1923,773,14,1924],"GitHub Copilot","工作流","/images/topics/ai/cursor-vs-copilot-vscode-workflow.jpg","团队在电脑前进行协作讨论",1181371,"https://www.pexels.com/photo/man-wearing-blue-dress-shirt-1181371/",15,{"type":23,"children":1931,"toc":2840},[1932,1937,1942,1960,1965,1983,1986,1992,1997,2028,2033,2036,2042,2050,2253,2261,2274,2277,2283,2289,2302,2307,2320,2326,2331,2364,2370,2375,2393,2396,2402,2407,2413,2418,2451,2457,2470,2475,2488,2494,2506,2512,2517,2530,2535,2538,2544,2549,2670,2673,2679,2689,2698,2716,2725,2733,2742,2760,2763,2769,2775,2780,2786,2791,2794,2799],{"type":26,"tag":27,"props":1933,"children":1934},{},[1935],{"type":31,"value":1936},"“Cursor 和 Copilot 到底有什么区别？”",{"type":26,"tag":27,"props":1938,"children":1939},{},[1940],{"type":31,"value":1941},"这个问题问得越早越好，因为你一旦把工具选错，后面所有痛苦都不是“提示词不够好”，而是：",{"type":26,"tag":461,"props":1943,"children":1944},{},[1945,1950,1955],{"type":26,"tag":43,"props":1946,"children":1947},{},[1948],{"type":31,"value":1949},"改动不可控（范围漂移、改错文件）",{"type":26,"tag":43,"props":1951,"children":1952},{},[1953],{"type":31,"value":1954},"验收成本爆炸（不知道要测什么）",{"type":26,"tag":43,"props":1956,"children":1957},{},[1958],{"type":31,"value":1959},"团队协作崩盘（没有闸门、没有回滚）",{"type":26,"tag":27,"props":1961,"children":1962},{},[1963],{"type":31,"value":1964},"这篇文章用一张选择矩阵 + 一套可执行工作流，帮你做到两件事：",{"type":26,"tag":39,"props":1966,"children":1967},{},[1968,1973],{"type":26,"tag":43,"props":1969,"children":1970},{},[1971],{"type":31,"value":1972},"知道什么时候用 Cursor、什么时候用 Copilot、什么时候“纯 VS Code 更快”",{"type":26,"tag":43,"props":1974,"children":1975},{},[1976,1978],{"type":31,"value":1977},"就算用 AI，也能把风险关在笼子里：",{"type":26,"tag":819,"props":1979,"children":1980},{},[1981],{"type":31,"value":1982},"可审查、可验证、可回滚",{"type":26,"tag":879,"props":1984,"children":1985},{},[],{"type":26,"tag":91,"props":1987,"children":1989},{"id":1988},"结论先说三者不是互斥而是分工",[1990],{"type":31,"value":1991},"结论先说：三者不是互斥，而是分工",{"type":26,"tag":27,"props":1993,"children":1994},{},[1995],{"type":31,"value":1996},"你可以把它们看成三层能力：",{"type":26,"tag":461,"props":1998,"children":1999},{},[2000,2009,2019],{"type":26,"tag":43,"props":2001,"children":2002},{},[2003,2007],{"type":26,"tag":819,"props":2004,"children":2005},{},[2006],{"type":31,"value":773},{"type":31,"value":2008},"：编辑器与生态（调试、插件、任务、终端、语言服务）",{"type":26,"tag":43,"props":2010,"children":2011},{},[2012,2017],{"type":26,"tag":819,"props":2013,"children":2014},{},[2015],{"type":31,"value":2016},"Copilot",{"type":31,"value":2018},"：代码补全与局部建议（“我正在写这一行/这一段”）",{"type":26,"tag":43,"props":2020,"children":2021},{},[2022,2026],{"type":26,"tag":819,"props":2023,"children":2024},{},[2025],{"type":31,"value":13},{"type":31,"value":2027},"：以项目为单位的 AI 协作（对话、索引、多文件编辑、规则）",{"type":26,"tag":27,"props":2029,"children":2030},{},[2031],{"type":31,"value":2032},"最常见的误区是：把“局部补全能力”当作“能做架构与多文件落地”。",{"type":26,"tag":879,"props":2034,"children":2035},{},[],{"type":26,"tag":91,"props":2037,"children":2039},{"id":2038},"选择矩阵按任务类型选工具不是按偏好",[2040],{"type":31,"value":2041},"选择矩阵：按任务类型选工具（不是按偏好）",{"type":26,"tag":1187,"props":2043,"children":2044},{},[2045],{"type":26,"tag":27,"props":2046,"children":2047},{},[2048],{"type":31,"value":2049},"你只要把自己的任务放进表格，就能得到推荐路径。",{"type":26,"tag":103,"props":2051,"children":2052},{},[2053,2084],{"type":26,"tag":107,"props":2054,"children":2055},{},[2056],{"type":26,"tag":111,"props":2057,"children":2058},{},[2059,2063,2069,2074,2079],{"type":26,"tag":115,"props":2060,"children":2061},{},[2062],{"type":31,"value":119},{"type":26,"tag":115,"props":2064,"children":2066},{"align":2065},"right",[2067],{"type":31,"value":2068},"风险",{"type":26,"tag":115,"props":2070,"children":2071},{"align":2065},[2072],{"type":31,"value":2073},"验收成本",{"type":26,"tag":115,"props":2075,"children":2076},{},[2077],{"type":31,"value":2078},"更推荐",{"type":26,"tag":115,"props":2080,"children":2081},{},[2082],{"type":31,"value":2083},"为什么",{"type":26,"tag":131,"props":2085,"children":2086},{},[2087,2114,2147,2173,2200,2227],{"type":26,"tag":111,"props":2088,"children":2089},{},[2090,2095,2100,2104,2109],{"type":26,"tag":138,"props":2091,"children":2092},{},[2093],{"type":31,"value":2094},"写一段代码/补一个 if",{"type":26,"tag":138,"props":2096,"children":2097},{"align":2065},[2098],{"type":31,"value":2099},"低",{"type":26,"tag":138,"props":2101,"children":2102},{"align":2065},[2103],{"type":31,"value":2099},{"type":26,"tag":138,"props":2105,"children":2106},{},[2107],{"type":31,"value":2108},"Copilot / Cursor 内联编辑",{"type":26,"tag":138,"props":2110,"children":2111},{},[2112],{"type":31,"value":2113},"局部建议足够，成本最低",{"type":26,"tag":111,"props":2115,"children":2116},{},[2117,2122,2127,2131,2142],{"type":26,"tag":138,"props":2118,"children":2119},{},[2120],{"type":31,"value":2121},"重构一个函数",{"type":26,"tag":138,"props":2123,"children":2124},{"align":2065},[2125],{"type":31,"value":2126},"中",{"type":26,"tag":138,"props":2128,"children":2129},{"align":2065},[2130],{"type":31,"value":2126},{"type":26,"tag":138,"props":2132,"children":2133},{},[2134,2136],{"type":31,"value":2135},"Cursor ",{"type":26,"tag":254,"props":2137,"children":2139},{"className":2138},[],[2140],{"type":31,"value":2141},"内联编辑",{"type":26,"tag":138,"props":2143,"children":2144},{},[2145],{"type":31,"value":2146},"需要解释、需要约束输出",{"type":26,"tag":111,"props":2148,"children":2149},{},[2150,2155,2159,2163,2168],{"type":26,"tag":138,"props":2151,"children":2152},{},[2153],{"type":31,"value":2154},"改一个组件 + 样式",{"type":26,"tag":138,"props":2156,"children":2157},{"align":2065},[2158],{"type":31,"value":2126},{"type":26,"tag":138,"props":2160,"children":2161},{"align":2065},[2162],{"type":31,"value":2126},{"type":26,"tag":138,"props":2164,"children":2165},{},[2166],{"type":31,"value":2167},"Cursor（小范围多文件）",{"type":26,"tag":138,"props":2169,"children":2170},{},[2171],{"type":31,"value":2172},"需要同时改模板与样式",{"type":26,"tag":111,"props":2174,"children":2175},{},[2176,2181,2186,2190,2195],{"type":26,"tag":138,"props":2177,"children":2178},{},[2179],{"type":31,"value":2180},"改 3~5 个文件（组件+api+测试）",{"type":26,"tag":138,"props":2182,"children":2183},{"align":2065},[2184],{"type":31,"value":2185},"高",{"type":26,"tag":138,"props":2187,"children":2188},{"align":2065},[2189],{"type":31,"value":2185},{"type":26,"tag":138,"props":2191,"children":2192},{},[2193],{"type":31,"value":2194},"Cursor Composer + 闸门",{"type":26,"tag":138,"props":2196,"children":2197},{},[2198],{"type":31,"value":2199},"需要计划、验收、回滚",{"type":26,"tag":111,"props":2201,"children":2202},{},[2203,2208,2213,2217,2222],{"type":26,"tag":138,"props":2204,"children":2205},{},[2206],{"type":31,"value":2207},"重写一段架构/引入新依赖",{"type":26,"tag":138,"props":2209,"children":2210},{"align":2065},[2211],{"type":31,"value":2212},"很高",{"type":26,"tag":138,"props":2214,"children":2215},{"align":2065},[2216],{"type":31,"value":2212},{"type":26,"tag":138,"props":2218,"children":2219},{},[2220],{"type":31,"value":2221},"先人脑设计 + VS Code 实现",{"type":26,"tag":138,"props":2223,"children":2224},{},[2225],{"type":31,"value":2226},"AI 易发散，最好先设计再执行",{"type":26,"tag":111,"props":2228,"children":2229},{},[2230,2235,2239,2243,2248],{"type":26,"tag":138,"props":2231,"children":2232},{},[2233],{"type":31,"value":2234},"排查线上问题/性能抖动",{"type":26,"tag":138,"props":2236,"children":2237},{"align":2065},[2238],{"type":31,"value":2185},{"type":26,"tag":138,"props":2240,"children":2241},{"align":2065},[2242],{"type":31,"value":2212},{"type":26,"tag":138,"props":2244,"children":2245},{},[2246],{"type":31,"value":2247},"VS Code + 工具链优先，AI 辅助归纳",{"type":26,"tag":138,"props":2249,"children":2250},{},[2251],{"type":31,"value":2252},"需要证据，不要“猜”",{"type":26,"tag":27,"props":2254,"children":2255},{},[2256],{"type":26,"tag":819,"props":2257,"children":2258},{},[2259],{"type":31,"value":2260},"一句话规则：",{"type":26,"tag":461,"props":2262,"children":2263},{},[2264,2269],{"type":26,"tag":43,"props":2265,"children":2266},{},[2267],{"type":31,"value":2268},"当你的改动可以用“10 条最小回归集”覆盖时，用 Cursor。",{"type":26,"tag":43,"props":2270,"children":2271},{},[2272],{"type":31,"value":2273},"当你的改动无法验证时，先别让 AI 动手。",{"type":26,"tag":879,"props":2275,"children":2276},{},[],{"type":26,"tag":91,"props":2278,"children":2280},{"id":2279},"差异拆解到底差在哪里",[2281],{"type":31,"value":2282},"差异拆解：到底差在哪里？",{"type":26,"tag":1205,"props":2284,"children":2286},{"id":2285},"_1-上下文来源补全-vs-项目索引",[2287],{"type":31,"value":2288},"1) 上下文来源：补全 vs 项目索引",{"type":26,"tag":461,"props":2290,"children":2291},{},[2292,2297],{"type":26,"tag":43,"props":2293,"children":2294},{},[2295],{"type":31,"value":2296},"Copilot 更擅长：你正在写的这几行、当前文件的局部上下文",{"type":26,"tag":43,"props":2298,"children":2299},{},[2300],{"type":31,"value":2301},"Cursor 更擅长：项目级索引 + 多文件关联理解",{"type":26,"tag":27,"props":2303,"children":2304},{},[2305],{"type":31,"value":2306},"因此：",{"type":26,"tag":461,"props":2308,"children":2309},{},[2310,2315],{"type":26,"tag":43,"props":2311,"children":2312},{},[2313],{"type":31,"value":2314},"写代码片段：Copilot 速度更快",{"type":26,"tag":43,"props":2316,"children":2317},{},[2318],{"type":31,"value":2319},"改一坨工程：Cursor 更有胜算（但更需要闸门）",{"type":26,"tag":1205,"props":2321,"children":2323},{"id":2322},"_2-交互方式你能不能控制范围",[2324],{"type":31,"value":2325},"2) 交互方式：你能不能控制范围",{"type":26,"tag":27,"props":2327,"children":2328},{},[2329],{"type":31,"value":2330},"范围控制的三个层级：",{"type":26,"tag":39,"props":2332,"children":2333},{},[2334,2344,2354],{"type":26,"tag":43,"props":2335,"children":2336},{},[2337,2339],{"type":31,"value":2338},"内联编辑（选中一段）→ ",{"type":26,"tag":819,"props":2340,"children":2341},{},[2342],{"type":31,"value":2343},"最强范围控制",{"type":26,"tag":43,"props":2345,"children":2346},{},[2347,2349],{"type":31,"value":2348},"Composer 多文件（先列文件清单）→ ",{"type":26,"tag":819,"props":2350,"children":2351},{},[2352],{"type":31,"value":2353},"可控但要闸门",{"type":26,"tag":43,"props":2355,"children":2356},{},[2357,2359],{"type":31,"value":2358},"大对话（泛目标）→ ",{"type":26,"tag":819,"props":2360,"children":2361},{},[2362],{"type":31,"value":2363},"最容易跑偏",{"type":26,"tag":1205,"props":2365,"children":2367},{"id":2366},"_3-输出形态建议-vs-可审查的变更",[2368],{"type":31,"value":2369},"3) 输出形态：建议 vs 可审查的变更",{"type":26,"tag":27,"props":2371,"children":2372},{},[2373],{"type":31,"value":2374},"最好的 AI 输出不是“给我一段代码”，而是：",{"type":26,"tag":461,"props":2376,"children":2377},{},[2378,2383,2388],{"type":26,"tag":43,"props":2379,"children":2380},{},[2381],{"type":31,"value":2382},"改动摘要（做了什么）",{"type":26,"tag":43,"props":2384,"children":2385},{},[2386],{"type":31,"value":2387},"diff 级别的可审查变更",{"type":26,"tag":43,"props":2389,"children":2390},{},[2391],{"type":31,"value":2392},"验收步骤与回滚方案",{"type":26,"tag":879,"props":2394,"children":2395},{},[],{"type":26,"tag":91,"props":2397,"children":2399},{"id":2398},"一套可落地的团队工作流把风险关住",[2400],{"type":31,"value":2401},"一套可落地的团队工作流（把风险关住）",{"type":26,"tag":27,"props":2403,"children":2404},{},[2405],{"type":31,"value":2406},"下面这套流程，你可以直接写进团队规范：",{"type":26,"tag":1205,"props":2408,"children":2410},{"id":2409},"step-1先写任务单geo-友好结构",[2411],{"type":31,"value":2412},"Step 1：先写任务单（GEO 友好结构）",{"type":26,"tag":27,"props":2414,"children":2415},{},[2416],{"type":31,"value":2417},"模板：",{"type":26,"tag":461,"props":2419,"children":2420},{},[2421,2426,2431,2436,2441,2446],{"type":26,"tag":43,"props":2422,"children":2423},{},[2424],{"type":31,"value":2425},"目标：……",{"type":26,"tag":43,"props":2427,"children":2428},{},[2429],{"type":31,"value":2430},"背景：……",{"type":26,"tag":43,"props":2432,"children":2433},{},[2434],{"type":31,"value":2435},"范围：只改这些文件/模块：……",{"type":26,"tag":43,"props":2437,"children":2438},{},[2439],{"type":31,"value":2440},"非目标：不做哪些事情：……",{"type":26,"tag":43,"props":2442,"children":2443},{},[2444],{"type":31,"value":2445},"验收：如何判断完成（可测试/可观察）：……",{"type":26,"tag":43,"props":2447,"children":2448},{},[2449],{"type":31,"value":2450},"回滚：如果失败怎么撤回：……",{"type":26,"tag":1205,"props":2452,"children":2454},{"id":2453},"step-2用范围闸门限制-ai",[2455],{"type":31,"value":2456},"Step 2：用“范围闸门”限制 AI",{"type":26,"tag":461,"props":2458,"children":2459},{},[2460,2465],{"type":26,"tag":43,"props":2461,"children":2462},{},[2463],{"type":31,"value":2464},"单文件改动：优先 Cursor 内联编辑",{"type":26,"tag":43,"props":2466,"children":2467},{},[2468],{"type":31,"value":2469},"多文件改动：必须先让 AI 输出“文件清单（≤5）+ 每步验收”",{"type":26,"tag":27,"props":2471,"children":2472},{},[2473],{"type":31,"value":2474},"如果 AI 输出的文件清单超过 5 个：",{"type":26,"tag":461,"props":2476,"children":2477},{},[2478,2483],{"type":26,"tag":43,"props":2479,"children":2480},{},[2481],{"type":31,"value":2482},"不是它太强，是任务太大",{"type":26,"tag":43,"props":2484,"children":2485},{},[2486],{"type":31,"value":2487},"你需要拆任务，而不是继续推进",{"type":26,"tag":1205,"props":2489,"children":2491},{"id":2490},"step-3最小回归集10-条",[2492],{"type":31,"value":2493},"Step 3：最小回归集（10 条）",{"type":26,"tag":27,"props":2495,"children":2496},{},[2497,2499,2504],{"type":31,"value":2498},"每次接受改动前必须跑（可参考：",{"type":26,"tag":74,"props":2500,"children":2501},{"href":766},[2502],{"type":31,"value":2503},"Cursor 快捷键速查表",{"type":31,"value":2505}," 里的清单）。",{"type":26,"tag":1205,"props":2507,"children":2509},{"id":2508},"step-4回滚策略不用等事故才想",[2510],{"type":31,"value":2511},"Step 4：回滚策略（不用等事故才想）",{"type":26,"tag":27,"props":2513,"children":2514},{},[2515],{"type":31,"value":2516},"回滚最常见的两条路：",{"type":26,"tag":461,"props":2518,"children":2519},{},[2520,2525],{"type":26,"tag":43,"props":2521,"children":2522},{},[2523],{"type":31,"value":2524},"git 回滚 commit",{"type":26,"tag":43,"props":2526,"children":2527},{},[2528],{"type":31,"value":2529},"对关键文件保留前版本（至少能快速恢复）",{"type":26,"tag":27,"props":2531,"children":2532},{},[2533],{"type":31,"value":2534},"你需要做到：任何一轮 AI 改动都能在 5 分钟内撤回。",{"type":26,"tag":879,"props":2536,"children":2537},{},[],{"type":26,"tag":91,"props":2539,"children":2541},{"id":2540},"必交付物对比矩阵可复制",[2542],{"type":31,"value":2543},"必交付物：对比矩阵（可复制）",{"type":26,"tag":27,"props":2545,"children":2546},{},[2547],{"type":31,"value":2548},"下面这张表可以直接贴到你的团队 wiki：",{"type":26,"tag":103,"props":2550,"children":2551},{},[2552,2575],{"type":26,"tag":107,"props":2553,"children":2554},{},[2555],{"type":26,"tag":111,"props":2556,"children":2557},{},[2558,2563,2567,2571],{"type":26,"tag":115,"props":2559,"children":2560},{},[2561],{"type":31,"value":2562},"维度",{"type":26,"tag":115,"props":2564,"children":2565},{},[2566],{"type":31,"value":773},{"type":26,"tag":115,"props":2568,"children":2569},{},[2570],{"type":31,"value":2016},{"type":26,"tag":115,"props":2572,"children":2573},{},[2574],{"type":31,"value":13},{"type":26,"tag":131,"props":2576,"children":2577},{},[2578,2601,2624,2647],{"type":26,"tag":111,"props":2579,"children":2580},{},[2581,2586,2591,2596],{"type":26,"tag":138,"props":2582,"children":2583},{},[2584],{"type":31,"value":2585},"强项",{"type":26,"tag":138,"props":2587,"children":2588},{},[2589],{"type":31,"value":2590},"工具链、调试、生态",{"type":26,"tag":138,"props":2592,"children":2593},{},[2594],{"type":31,"value":2595},"补全与局部建议",{"type":26,"tag":138,"props":2597,"children":2598},{},[2599],{"type":31,"value":2600},"项目上下文、多文件落地",{"type":26,"tag":111,"props":2602,"children":2603},{},[2604,2609,2614,2619],{"type":26,"tag":138,"props":2605,"children":2606},{},[2607],{"type":31,"value":2608},"适合任务",{"type":26,"tag":138,"props":2610,"children":2611},{},[2612],{"type":31,"value":2613},"排查、调试、验证",{"type":26,"tag":138,"props":2615,"children":2616},{},[2617],{"type":31,"value":2618},"写一段、补一段",{"type":26,"tag":138,"props":2620,"children":2621},{},[2622],{"type":31,"value":2623},"改一段、改一组文件",{"type":26,"tag":111,"props":2625,"children":2626},{},[2627,2632,2637,2642],{"type":26,"tag":138,"props":2628,"children":2629},{},[2630],{"type":31,"value":2631},"最大风险",{"type":26,"tag":138,"props":2633,"children":2634},{},[2635],{"type":31,"value":2636},"无",{"type":26,"tag":138,"props":2638,"children":2639},{},[2640],{"type":31,"value":2641},"过度依赖建议",{"type":26,"tag":138,"props":2643,"children":2644},{},[2645],{"type":31,"value":2646},"范围漂移、多文件回归",{"type":26,"tag":111,"props":2648,"children":2649},{},[2650,2655,2660,2665],{"type":26,"tag":138,"props":2651,"children":2652},{},[2653],{"type":31,"value":2654},"必须搭配",{"type":26,"tag":138,"props":2656,"children":2657},{},[2658],{"type":31,"value":2659},"规范与检查",{"type":26,"tag":138,"props":2661,"children":2662},{},[2663],{"type":31,"value":2664},"代码评审",{"type":26,"tag":138,"props":2666,"children":2667},{},[2668],{"type":31,"value":2669},"闸门 + 最小回归集",{"type":26,"tag":879,"props":2671,"children":2672},{},[],{"type":26,"tag":91,"props":2674,"children":2676},{"id":2675},"失败案例多文件看似成功实际埋雷",[2677],{"type":31,"value":2678},"失败案例：多文件“看似成功”，实际埋雷",{"type":26,"tag":27,"props":2680,"children":2681},{},[2682,2687],{"type":26,"tag":819,"props":2683,"children":2684},{},[2685],{"type":31,"value":2686},"现象",{"type":31,"value":2688},"：AI 说“我已经把所有地方都改了”，你也接受了，结果上线后 404 或样式错位。",{"type":26,"tag":27,"props":2690,"children":2691},{},[2692,2697],{"type":26,"tag":819,"props":2693,"children":2694},{},[2695],{"type":31,"value":2696},"复现条件",{"type":31,"value":1511},{"type":26,"tag":461,"props":2699,"children":2700},{},[2701,2706,2711],{"type":26,"tag":43,"props":2702,"children":2703},{},[2704],{"type":31,"value":2705},"你给了一个大目标（例如“把所有按钮统一成主题色”）",{"type":26,"tag":43,"props":2707,"children":2708},{},[2709],{"type":31,"value":2710},"它改了组件、样式、甚至主题配置",{"type":26,"tag":43,"props":2712,"children":2713},{},[2714],{"type":31,"value":2715},"你没有按页面模块走一遍，直接合并",{"type":26,"tag":27,"props":2717,"children":2718},{},[2719,2724],{"type":26,"tag":819,"props":2720,"children":2721},{},[2722],{"type":31,"value":2723},"根因",{"type":31,"value":1511},{"type":26,"tag":461,"props":2726,"children":2727},{},[2728],{"type":26,"tag":43,"props":2729,"children":2730},{},[2731],{"type":31,"value":2732},"改动范围大，但验收仍按“小改动”的方式做（只看一处）",{"type":26,"tag":27,"props":2734,"children":2735},{},[2736,2741],{"type":26,"tag":819,"props":2737,"children":2738},{},[2739],{"type":31,"value":2740},"修复",{"type":31,"value":1511},{"type":26,"tag":461,"props":2743,"children":2744},{},[2745,2750,2755],{"type":26,"tag":43,"props":2746,"children":2747},{},[2748],{"type":31,"value":2749},"强制把任务拆成“模块级目标”：Hero、Feature、Pricing、Form",{"type":26,"tag":43,"props":2751,"children":2752},{},[2753],{"type":31,"value":2754},"每个模块改完就验收一次",{"type":26,"tag":43,"props":2756,"children":2757},{},[2758],{"type":31,"value":2759},"验收通过再进入下一个模块",{"type":26,"tag":879,"props":2761,"children":2762},{},[],{"type":26,"tag":91,"props":2764,"children":2766},{"id":2765},"faq",[2767],{"type":31,"value":2768},"FAQ",{"type":26,"tag":1205,"props":2770,"children":2772},{"id":2771},"q1我已经用了-cursor为什么还要用-copilot",[2773],{"type":31,"value":2774},"Q1：我已经用了 Cursor，为什么还要用 Copilot？",{"type":26,"tag":27,"props":2776,"children":2777},{},[2778],{"type":31,"value":2779},"因为“补全”这种高频低风险任务，Copilot 的交互成本更低；Cursor 更适合需要解释与约束的改动。",{"type":26,"tag":1205,"props":2781,"children":2783},{"id":2782},"q2什么时候应该完全不用-ai",[2784],{"type":31,"value":2785},"Q2：什么时候应该完全不用 AI？",{"type":26,"tag":27,"props":2787,"children":2788},{},[2789],{"type":31,"value":2790},"当你无法定义验收标准时。比如“更高级”“更好看”这种目标，先做信息结构与设计规则，再让 AI 帮你落地局部。",{"type":26,"tag":879,"props":2792,"children":2793},{},[],{"type":26,"tag":91,"props":2795,"children":2797},{"id":2796},"延伸阅读",[2798],{"type":31,"value":2796},{"type":26,"tag":461,"props":2800,"children":2801},{},[2802,2811,2820,2829],{"type":26,"tag":43,"props":2803,"children":2804},{},[2805,2807],{"type":31,"value":2806},"Cursor 入门：",{"type":26,"tag":74,"props":2808,"children":2809},{"href":76},[2810],{"type":31,"value":855},{"type":26,"tag":43,"props":2812,"children":2813},{},[2814,2816],{"type":31,"value":2815},"Cursor 进阶：",{"type":26,"tag":74,"props":2817,"children":2818},{"href":863},[2819],{"type":31,"value":866},{"type":26,"tag":43,"props":2821,"children":2822},{},[2823,2825],{"type":31,"value":2824},"规则配置：",{"type":26,"tag":74,"props":2826,"children":2827},{"href":874},[2828],{"type":31,"value":877},{"type":26,"tag":43,"props":2830,"children":2831},{},[2832,2834],{"type":31,"value":2833},"Copilot 实战：",{"type":26,"tag":74,"props":2835,"children":2837},{"href":2836},"/topics/ai/github-copilot-tips",[2838],{"type":31,"value":2839},"GitHub Copilot 实用技巧",{"title":7,"searchDepth":746,"depth":746,"links":2841},[2842,2843,2844,2849,2855,2856,2857,2861],{"id":1988,"depth":749,"text":1991},{"id":2038,"depth":749,"text":2041},{"id":2279,"depth":749,"text":2282,"children":2845},[2846,2847,2848],{"id":2285,"depth":746,"text":2288},{"id":2322,"depth":746,"text":2325},{"id":2366,"depth":746,"text":2369},{"id":2398,"depth":749,"text":2401,"children":2850},[2851,2852,2853,2854],{"id":2409,"depth":746,"text":2412},{"id":2453,"depth":746,"text":2456},{"id":2490,"depth":746,"text":2493},{"id":2508,"depth":746,"text":2511},{"id":2540,"depth":749,"text":2543},{"id":2675,"depth":749,"text":2678},{"id":2765,"depth":749,"text":2768,"children":2858},[2859,2860],{"id":2771,"depth":746,"text":2774},{"id":2782,"depth":746,"text":2785},{"id":2796,"depth":749,"text":2796},"content:topics:ai:cursor-vs-copilot-vscode-workflow.md","topics/ai/cursor-vs-copilot-vscode-workflow.md","topics/ai/cursor-vs-copilot-vscode-workflow",{"_path":2866,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2867,"description":2868,"date":2869,"topic":5,"author":11,"tags":2870,"image":2875,"featured":634,"readingTime":1929,"body":2876,"_type":758,"_id":3524,"_source":760,"_file":3525,"_stem":3526,"_extension":763},"/topics/ai/ai-debugging-troubleshooting-guide","AI 辅助调试与问题排查：让 AI 成为你的调试搭档","深入探讨如何利用 AI 工具提升调试效率，包括错误信息分析、日志解读、性能问题定位、复杂 bug 排查等实战场景，构建 AI 驱动的调试工作流。","2026-01-18",[2871,2872,2873,774,2874],"AI 调试","问题排查","Debug","错误处理","/images/topics/ai/ai-debugging-guide.jpg",{"type":23,"children":2877,"toc":3495},[2878,2884,2890,2895,2900,2905,2911,2917,2922,2930,2958,2966,2989,2995,3005,3014,3022,3030,3063,3071,3101,3114,3122,3127,3135,3143,3154,3160,3168,3179,3187,3196,3202,3208,3213,3222,3228,3233,3242,3248,3254,3263,3269,3278,3284,3295,3301,3307,3316,3322,3331,3337,3343,3351,3357,3366,3374,3382,3385,3391,3396,3415,3427,3430,3436,3441,3450,3455,3458,3464,3469,3487],{"type":26,"tag":91,"props":2879,"children":2881},{"id":2880},"ai-辅助调试与问题排查",[2882],{"type":31,"value":2883},"AI 辅助调试与问题排查",{"type":26,"tag":91,"props":2885,"children":2887},{"id":2886},"引言调试的痛与-ai-的解药",[2888],{"type":31,"value":2889},"引言：调试的痛与 AI 的解药",{"type":26,"tag":27,"props":2891,"children":2892},{},[2893],{"type":31,"value":2894},"调试是每个程序员的日常，也是最消耗时间和精力的工作之一。我们都有过这样的经历：盯着一个莫名其妙的错误信息，翻遍 Stack Overflow，尝试各种方案，几个小时后才发现是一个愚蠢的拼写错误。",{"type":26,"tag":27,"props":2896,"children":2897},{},[2898],{"type":31,"value":2899},"AI 工具的出现，正在改变调试的方式。不是替代你的思考，而是加速你的分析过程——帮你快速理解错误、缩小排查范围、验证假设。",{"type":26,"tag":27,"props":2901,"children":2902},{},[2903],{"type":31,"value":2904},"这篇文章分享我在实际项目中使用 AI 辅助调试的经验和方法论。",{"type":26,"tag":91,"props":2906,"children":2908},{"id":2907},"第一部分建立-ai-调试的思维模型",[2909],{"type":31,"value":2910},"第一部分：建立 AI 调试的思维模型",{"type":26,"tag":1205,"props":2912,"children":2914},{"id":2913},"_11-ai-在调试中的角色",[2915],{"type":31,"value":2916},"1.1 AI 在调试中的角色",{"type":26,"tag":27,"props":2918,"children":2919},{},[2920],{"type":31,"value":2921},"把 AI 想象成一个经验丰富但不了解你项目的高级工程师。它：",{"type":26,"tag":27,"props":2923,"children":2924},{},[2925],{"type":26,"tag":819,"props":2926,"children":2927},{},[2928],{"type":31,"value":2929},"擅长的事情：",{"type":26,"tag":461,"props":2931,"children":2932},{},[2933,2938,2943,2948,2953],{"type":26,"tag":43,"props":2934,"children":2935},{},[2936],{"type":31,"value":2937},"解读错误信息的含义",{"type":26,"tag":43,"props":2939,"children":2940},{},[2941],{"type":31,"value":2942},"提供可能的原因列表",{"type":26,"tag":43,"props":2944,"children":2945},{},[2946],{"type":31,"value":2947},"给出排查方向建议",{"type":26,"tag":43,"props":2949,"children":2950},{},[2951],{"type":31,"value":2952},"解释复杂的技术概念",{"type":26,"tag":43,"props":2954,"children":2955},{},[2956],{"type":31,"value":2957},"生成调试代码片段",{"type":26,"tag":27,"props":2959,"children":2960},{},[2961],{"type":26,"tag":819,"props":2962,"children":2963},{},[2964],{"type":31,"value":2965},"不擅长的事情：",{"type":26,"tag":461,"props":2967,"children":2968},{},[2969,2974,2979,2984],{"type":26,"tag":43,"props":2970,"children":2971},{},[2972],{"type":31,"value":2973},"了解你的业务逻辑",{"type":26,"tag":43,"props":2975,"children":2976},{},[2977],{"type":31,"value":2978},"知道你的代码历史",{"type":26,"tag":43,"props":2980,"children":2981},{},[2982],{"type":31,"value":2983},"理解项目特定的约定",{"type":26,"tag":43,"props":2985,"children":2986},{},[2987],{"type":31,"value":2988},"做出架构级判断",{"type":26,"tag":1205,"props":2990,"children":2992},{"id":2991},"_12-有效提问的结构",[2993],{"type":31,"value":2994},"1.2 有效提问的结构",{"type":26,"tag":247,"props":2996,"children":3000},{"code":2997,"language":758,"meta":7,"className":2998},"## 高效的调试提问模板\n\n**问题描述**\n[简洁描述遇到的问题]\n\n**错误信息**\n",[2999],"language-markdown",[3001],{"type":26,"tag":254,"props":3002,"children":3003},{"__ignoreMap":7},[3004],{"type":31,"value":2997},{"type":26,"tag":27,"props":3006,"children":3007},{},[3008],{"type":26,"tag":3009,"props":3010,"children":3011},"span",{},[3012],{"type":31,"value":3013},"完整的错误信息，不要截断",{"type":26,"tag":247,"props":3015,"children":3017},{"code":3016},"\n**相关代码**\n```javascript\n[精简但完整的相关代码]\n",[3018],{"type":26,"tag":254,"props":3019,"children":3020},{"__ignoreMap":7},[3021],{"type":31,"value":3016},{"type":26,"tag":27,"props":3023,"children":3024},{},[3025],{"type":26,"tag":819,"props":3026,"children":3027},{},[3028],{"type":31,"value":3029},"环境信息",{"type":26,"tag":461,"props":3031,"children":3032},{},[3033,3043,3053],{"type":26,"tag":43,"props":3034,"children":3035},{},[3036,3038],{"type":31,"value":3037},"运行环境：",{"type":26,"tag":3009,"props":3039,"children":3040},{},[3041],{"type":31,"value":3042},"Node 版本/浏览器版本",{"type":26,"tag":43,"props":3044,"children":3045},{},[3046,3048],{"type":31,"value":3047},"框架版本：",{"type":26,"tag":3009,"props":3049,"children":3050},{},[3051],{"type":31,"value":3052},"相关框架版本",{"type":26,"tag":43,"props":3054,"children":3055},{},[3056,3058],{"type":31,"value":3057},"操作系统：",{"type":26,"tag":3009,"props":3059,"children":3060},{},[3061],{"type":31,"value":3062},"如果相关",{"type":26,"tag":27,"props":3064,"children":3065},{},[3066],{"type":26,"tag":819,"props":3067,"children":3068},{},[3069],{"type":31,"value":3070},"已尝试的方案",{"type":26,"tag":461,"props":3072,"children":3073},{},[3074,3088],{"type":26,"tag":43,"props":3075,"children":3076},{},[3077,3082,3083],{"type":26,"tag":3009,"props":3078,"children":3079},{},[3080],{"type":31,"value":3081},"方案1",{"type":31,"value":1511},{"type":26,"tag":3009,"props":3084,"children":3085},{},[3086],{"type":31,"value":3087},"结果",{"type":26,"tag":43,"props":3089,"children":3090},{},[3091,3096,3097],{"type":26,"tag":3009,"props":3092,"children":3093},{},[3094],{"type":31,"value":3095},"方案2",{"type":31,"value":1511},{"type":26,"tag":3009,"props":3098,"children":3099},{},[3100],{"type":31,"value":3087},{"type":26,"tag":27,"props":3102,"children":3103},{},[3104,3109],{"type":26,"tag":819,"props":3105,"children":3106},{},[3107],{"type":31,"value":3108},"期望的结果",{"type":26,"tag":3009,"props":3110,"children":3111},{},[3112],{"type":31,"value":3113},"描述期望的行为",{"type":26,"tag":247,"props":3115,"children":3117},{"code":3116},"\n### 1.3 分级调试策略\n\n",[3118],{"type":26,"tag":254,"props":3119,"children":3120},{"__ignoreMap":7},[3121],{"type":31,"value":3116},{"type":26,"tag":27,"props":3123,"children":3124},{},[3125],{"type":31,"value":3126},"┌───────────────────────────────────────────────────────────┐\n│                    AI 辅助调试决策树                        │\n├───────────────────────────────────────────────────────────┤\n│                                                           │\n│  Level 1：简单错误（5分钟内解决）                           │\n│  ├── 语法错误、拼写错误                                    │\n│  ├── 方法：直接复制错误信息给 AI                           │\n│  └── 工具：Copilot Chat / ChatGPT                        │\n│                                                           │\n│  Level 2：中等复杂度（30分钟内解决）                        │\n│  ├── 类型错误、逻辑错误、API 使用错误                      │\n│  ├── 方法：提供错误信息 + 相关代码 + 上下文                 │\n│  └── 工具：Cursor Chat / Claude                          │\n│                                                           │\n│  Level 3：复杂问题（需要深入分析）                          │\n│  ├── 竞态条件、内存泄漏、性能问题                          │\n│  ├── 方法：详细描述场景 + 提供多个文件 + 讨论               │\n│  └── 工具：Cursor Composer / 专门的 AI 会话                │\n│                                                           │\n│  Level 4：架构级问题                                       │\n│  ├── 设计缺陷、技术债务                                    │\n│  ├── 方法：AI 辅助分析 + 人工判断                          │\n│  └── 工具：与团队讨论 + AI 作为顾问                        │\n│                                                           │\n└───────────────────────────────────────────────────────────┘",{"type":26,"tag":247,"props":3128,"children":3130},{"code":3129},"\n## 第二部分：错误信息分析\n\n### 2.1 前端错误分析\n\n**场景 1：React 错误边界触发**\n\n```typescript\n// 错误信息：\n// Error: Hydration failed because the initial UI does not match \n// what was rendered on the server.\n\n// 提问方式：\n/**\n * 我在 Next.js 14 App Router 项目中遇到这个错误：\n * \n * Error: Hydration failed because the initial UI does not match \n * what was rendered on the server.\n * \n * 相关代码：\n */\nfunction UserStatus() {\n  const [isLoggedIn, setIsLoggedIn] = useState(false);\n  \n  useEffect(() => {\n    setIsLoggedIn(localStorage.getItem('token') !== null);\n  }, []);\n  \n  return \u003Cdiv>{isLoggedIn ? '已登录' : '未登录'}\u003C/div>;\n}\n\n// AI 会分析出：\n// 1. 服务端渲染时 localStorage 不可用，默认 false\n// 2. 客户端 hydration 时可能是 true\n// 3. 导致服务端和客户端渲染结果不一致\n\n// AI 建议的解决方案：\nfunction UserStatus() {\n  const [isLoggedIn, setIsLoggedIn] = useState\u003Cboolean | null>(null);\n  \n  useEffect(() => {\n    setIsLoggedIn(localStorage.getItem('token') !== null);\n  }, []);\n  \n  // 初始状态显示加载中，避免 hydration 不匹配\n  if (isLoggedIn === null) {\n    return \u003Cdiv>加载中...\u003C/div>;\n  }\n  \n  return \u003Cdiv>{isLoggedIn ? '已登录' : '未登录'}\u003C/div>;\n}\n",[3131],{"type":26,"tag":254,"props":3132,"children":3133},{"__ignoreMap":7},[3134],{"type":31,"value":3129},{"type":26,"tag":27,"props":3136,"children":3137},{},[3138],{"type":26,"tag":819,"props":3139,"children":3140},{},[3141],{"type":31,"value":3142},"场景 2：Vue 响应式警告",{"type":26,"tag":247,"props":3144,"children":3149},{"code":3145,"language":3146,"meta":7,"className":3147},"// 警告信息：\n// [Vue warn]: Property \"xxx\" was accessed during render but is not \n// defined on instance.\n\n// 提问方式：\n/**\n * Vue 3 项目中出现这个警告：\n * [Vue warn]: Property \"userInfo\" was accessed during render \n * but is not defined on instance.\n * \n * 组件代码：\n */\n\u003Ctemplate>\n  \u003Cdiv>{{ userInfo.name }}\u003C/div>\n\u003C/template>\n\n\u003Cscript setup>\nconst { data: userInfo } = await useFetch('/api/user');\n\u003C/script>\n\n// AI 分析：\n// 1. useFetch 是异步的，初始渲染时 userInfo 可能是 undefined\n// 2. 直接访问 userInfo.name 会报错\n\n// AI 建议：\n\u003Ctemplate>\n  \u003Cdiv v-if=\"userInfo\">{{ userInfo.name }}\u003C/div>\n  \u003Cdiv v-else>加载中...\u003C/div>\n\u003C/template>\n\n\u003Cscript setup>\nconst { data: userInfo, pending } = await useFetch('/api/user');\n\u003C/script>\n","typescript",[3148],"language-typescript",[3150],{"type":26,"tag":254,"props":3151,"children":3152},{"__ignoreMap":7},[3153],{"type":31,"value":3145},{"type":26,"tag":1205,"props":3155,"children":3157},{"id":3156},"_22-后端错误分析",[3158],{"type":31,"value":3159},"2.2 后端错误分析",{"type":26,"tag":27,"props":3161,"children":3162},{},[3163],{"type":26,"tag":819,"props":3164,"children":3165},{},[3166],{"type":31,"value":3167},"场景 1：Node.js 内存问题",{"type":26,"tag":247,"props":3169,"children":3174},{"code":3170,"language":3171,"meta":7,"className":3172},"// 错误信息：\n// FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - \n// JavaScript heap out of memory\n\n// 提问方式（包含上下文）：\n/**\n * Node.js 服务运行几小时后崩溃，错误信息：\n * FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - \n * JavaScript heap out of memory\n * \n * 服务功能：处理 CSV 文件上传，每次约 100MB\n * \n * 处理代码：\n */\nasync function processCSV(filePath) {\n  const content = fs.readFileSync(filePath, 'utf-8');\n  const rows = content.split('\\n');\n  const results = [];\n  \n  for (const row of rows) {\n    const processed = await processRow(row);\n    results.push(processed);\n  }\n  \n  return results;\n}\n\n// AI 分析会指出：\n// 1. 一次性读取整个文件到内存\n// 2. 所有处理结果累积在 results 数组\n// 3. 建议使用流式处理\n\n// AI 提供的优化方案：\nconst { createReadStream } = require('fs');\nconst { createInterface } = require('readline');\n\nasync function processCSVStream(filePath, onRow) {\n  const fileStream = createReadStream(filePath);\n  const rl = createInterface({\n    input: fileStream,\n    crlfDelay: Infinity\n  });\n  \n  let count = 0;\n  for await (const line of rl) {\n    await onRow(line);\n    count++;\n    \n    // 每处理 1000 行，给 GC 机会运行\n    if (count % 1000 === 0) {\n      await new Promise(r => setImmediate(r));\n    }\n  }\n}\n","javascript",[3173],"language-javascript",[3175],{"type":26,"tag":254,"props":3176,"children":3177},{"__ignoreMap":7},[3178],{"type":31,"value":3170},{"type":26,"tag":27,"props":3180,"children":3181},{},[3182],{"type":26,"tag":819,"props":3183,"children":3184},{},[3185],{"type":31,"value":3186},"场景 2：数据库连接问题",{"type":26,"tag":247,"props":3188,"children":3191},{"code":3189,"language":3146,"meta":7,"className":3190},"// 错误信息：\n// Error: Connection pool exhausted - \n// max connections (10) already in use\n\n// 提问方式：\n/**\n * PostgreSQL 连接池耗尽错误，高并发时出现：\n * Error: Connection pool exhausted\n * \n * 当前配置：\n * - max connections: 10\n * - 并发请求: 约 100/秒\n * \n * 数据库调用代码：\n */\nasync function getUserData(userId: string) {\n  const client = await pool.connect();\n  try {\n    const user = await client.query('SELECT * FROM users WHERE id = $1', [userId]);\n    const orders = await client.query('SELECT * FROM orders WHERE user_id = $1', [userId]);\n    const payments = await client.query('SELECT * FROM payments WHERE user_id = $1', [userId]);\n    return { user: user.rows[0], orders: orders.rows, payments: payments.rows };\n  } finally {\n    client.release();\n  }\n}\n\n// AI 会分析出多个可能原因并给出综合方案\n",[3148],[3192],{"type":26,"tag":254,"props":3193,"children":3194},{"__ignoreMap":7},[3195],{"type":31,"value":3189},{"type":26,"tag":91,"props":3197,"children":3199},{"id":3198},"第三部分日志分析与问题定位",[3200],{"type":31,"value":3201},"第三部分：日志分析与问题定位",{"type":26,"tag":1205,"props":3203,"children":3205},{"id":3204},"_31-结构化日志分析",[3206],{"type":31,"value":3207},"3.1 结构化日志分析",{"type":26,"tag":27,"props":3209,"children":3210},{},[3211],{"type":31,"value":3212},"当面对大量日志时，让 AI 帮你快速定位问题：",{"type":26,"tag":247,"props":3214,"children":3217},{"code":3215,"language":3171,"meta":7,"className":3216},"// 提问示例：\n/**\n * 分析以下日志，找出导致请求失败的原因：\n * \n * 日志片段：\n */\nconst logs = `\n2024-01-15 10:23:45.123 INFO  [req-abc123] 收到请求 POST /api/order\n2024-01-15 10:23:45.125 DEBUG [req-abc123] 用户认证通过 userId=u001\n2024-01-15 10:23:45.130 DEBUG [req-abc123] 开始库存检查 productId=p001\n2024-01-15 10:23:45.145 DEBUG [req-abc123] 库存检查通过 available=50\n2024-01-15 10:23:45.150 DEBUG [req-abc123] 开始创建订单\n2024-01-15 10:23:45.200 DEBUG [req-abc123] 数据库连接获取成功\n2024-01-15 10:23:45.250 ERROR [req-abc123] 订单创建失败 error=\"deadlock detected\"\n2024-01-15 10:23:45.251 WARN  [req-abc123] 事务回滚\n2024-01-15 10:23:45.255 INFO  [req-abc123] 响应 500 耗时 132ms\n`;\n\n// AI 分析结果会包括：\n// 1. 问题定位：数据库死锁\n// 2. 可能原因：并发订单创建导致锁竞争\n// 3. 排查建议：检查事务隔离级别、锁顺序\n",[3173],[3218],{"type":26,"tag":254,"props":3219,"children":3220},{"__ignoreMap":7},[3221],{"type":31,"value":3215},{"type":26,"tag":1205,"props":3223,"children":3225},{"id":3224},"_32-创建调试日志",[3226],{"type":31,"value":3227},"3.2 创建调试日志",{"type":26,"tag":27,"props":3229,"children":3230},{},[3231],{"type":31,"value":3232},"让 AI 帮你生成调试用的日志代码：",{"type":26,"tag":247,"props":3234,"children":3237},{"code":3235,"language":3146,"meta":7,"className":3236},"// 请求：\n// \"为这个函数添加详细的调试日志，包括入参、关键步骤、耗时和结果\"\n\n// 原代码：\nasync function processOrder(order: Order): Promise\u003COrderResult> {\n  const inventory = await checkInventory(order.items);\n  const payment = await processPayment(order.userId, order.total);\n  const result = await createOrder(order, payment.transactionId);\n  return result;\n}\n\n// AI 生成的带日志版本：\nasync function processOrder(order: Order): Promise\u003COrderResult> {\n  const requestId = generateRequestId();\n  const startTime = performance.now();\n  \n  logger.info({\n    requestId,\n    event: 'order_processing_start',\n    orderId: order.id,\n    userId: order.userId,\n    itemCount: order.items.length,\n    total: order.total\n  });\n  \n  try {\n    // 库存检查\n    const inventoryStart = performance.now();\n    const inventory = await checkInventory(order.items);\n    logger.debug({\n      requestId,\n      event: 'inventory_check_complete',\n      duration: performance.now() - inventoryStart,\n      available: inventory.allAvailable\n    });\n    \n    // 支付处理\n    const paymentStart = performance.now();\n    const payment = await processPayment(order.userId, order.total);\n    logger.debug({\n      requestId,\n      event: 'payment_complete',\n      duration: performance.now() - paymentStart,\n      transactionId: payment.transactionId\n    });\n    \n    // 创建订单\n    const createStart = performance.now();\n    const result = await createOrder(order, payment.transactionId);\n    logger.debug({\n      requestId,\n      event: 'order_created',\n      duration: performance.now() - createStart,\n      resultOrderId: result.orderId\n    });\n    \n    logger.info({\n      requestId,\n      event: 'order_processing_complete',\n      duration: performance.now() - startTime,\n      success: true\n    });\n    \n    return result;\n  } catch (error) {\n    logger.error({\n      requestId,\n      event: 'order_processing_failed',\n      duration: performance.now() - startTime,\n      error: error.message,\n      stack: error.stack\n    });\n    throw error;\n  }\n}\n",[3148],[3238],{"type":26,"tag":254,"props":3239,"children":3240},{"__ignoreMap":7},[3241],{"type":31,"value":3235},{"type":26,"tag":91,"props":3243,"children":3245},{"id":3244},"第四部分性能问题排查",[3246],{"type":31,"value":3247},"第四部分：性能问题排查",{"type":26,"tag":1205,"props":3249,"children":3251},{"id":3250},"_41-前端性能分析",[3252],{"type":31,"value":3253},"4.1 前端性能分析",{"type":26,"tag":247,"props":3255,"children":3258},{"code":3256,"language":3146,"meta":7,"className":3257},"// 场景：页面加载慢，需要分析原因\n\n// 提问方式：\n/**\n * 页面首屏加载需要 5 秒，以下是 Performance API 数据，\n * 请分析性能瓶颈：\n */\nconst performanceData = {\n  // Navigation Timing\n  dns: 50,           // DNS 查询\n  tcp: 100,          // TCP 连接\n  ttfb: 800,         // 首字节时间\n  download: 200,     // 文档下载\n  domParsing: 300,   // DOM 解析\n  domContentLoaded: 1500,\n  load: 5000,\n  \n  // Resource Timing (主要资源)\n  resources: [\n    { name: 'main.js', size: '2.5MB', duration: 1200 },\n    { name: 'vendor.js', size: '1.8MB', duration: 900 },\n    { name: 'styles.css', size: '500KB', duration: 300 },\n    { name: 'hero-image.jpg', size: '3MB', duration: 1500 },\n  ],\n  \n  // Long Tasks\n  longTasks: [\n    { startTime: 1600, duration: 800, name: 'script-evaluation' },\n    { startTime: 2500, duration: 400, name: 'layout' }\n  ]\n};\n\n// AI 会分析出：\n// 1. JS bundle 过大（4.3MB），需要代码分割\n// 2. 图片未优化（3MB 的 hero 图片）\n// 3. 存在长任务阻塞主线程\n// 并给出具体优化建议\n",[3148],[3259],{"type":26,"tag":254,"props":3260,"children":3261},{"__ignoreMap":7},[3262],{"type":31,"value":3256},{"type":26,"tag":1205,"props":3264,"children":3266},{"id":3265},"_42-内存泄漏排查",[3267],{"type":31,"value":3268},"4.2 内存泄漏排查",{"type":26,"tag":247,"props":3270,"children":3273},{"code":3271,"language":3146,"meta":7,"className":3272},"// 场景：应用运行一段时间后变卡\n\n// 提问方式：\n/**\n * React 应用运行一段时间后内存持续增长，以下是 Heap Snapshot 对比：\n * \n * 初始状态：50MB\n * 运行 1 小时后：150MB\n * 运行 2 小时后：280MB\n * \n * Retained objects 增长最快的：\n * - (closure) - 增长 50MB\n * - HTMLDivElement - 增长 30MB\n * - Array - 增长 20MB\n * \n * 可疑代码：\n */\nfunction DataDashboard() {\n  const [data, setData] = useState([]);\n  const chartRef = useRef(null);\n  \n  useEffect(() => {\n    // 每秒刷新数据\n    const interval = setInterval(async () => {\n      const newData = await fetchLatestData();\n      setData(prev => [...prev, ...newData]);  // 数据不断累积\n    }, 1000);\n    \n    // 初始化图表\n    const chart = new Chart(chartRef.current, {\n      // 配置...\n    });\n    \n    // 没有 cleanup！\n  }, []);\n  \n  return \u003Ccanvas ref={chartRef} />;\n}\n\n// AI 会指出：\n// 1. interval 没有清理\n// 2. Chart 实例没有销毁\n// 3. data 无限增长\n// 并提供修复代码\n",[3148],[3274],{"type":26,"tag":254,"props":3275,"children":3276},{"__ignoreMap":7},[3277],{"type":31,"value":3271},{"type":26,"tag":1205,"props":3279,"children":3281},{"id":3280},"_43-数据库查询优化",[3282],{"type":31,"value":3283},"4.3 数据库查询优化",{"type":26,"tag":247,"props":3285,"children":3290},{"code":3286,"language":3287,"meta":7,"className":3288},"-- 场景：查询很慢，让 AI 分析执行计划\n\n-- 提问方式：\n-- 以下查询在数据量大时很慢（orders 表 1000 万行），\n-- 执行计划如下，请分析并优化：\n\nEXPLAIN ANALYZE\nSELECT o.*, u.name, u.email\nFROM orders o\nJOIN users u ON o.user_id = u.id\nWHERE o.status = 'pending'\n  AND o.created_at > '2024-01-01'\nORDER BY o.created_at DESC\nLIMIT 20;\n\n-- 执行计划：\n/*\nSort  (cost=156847.23..157847.23 rows=400000 width=250)\n  Sort Key: o.created_at DESC\n  ->  Hash Join  (cost=1500.00..89847.23 rows=400000 width=250)\n        Hash Cond: (o.user_id = u.id)\n        ->  Seq Scan on orders o  (cost=0.00..85000.00 rows=400000)\n              Filter: ((status = 'pending') AND (created_at > '2024-01-01'))\n        ->  Hash  (cost=1000.00..1000.00 rows=50000 width=100)\n              ->  Seq Scan on users u  (cost=0.00..1000.00 rows=50000)\nPlanning Time: 0.5 ms\nExecution Time: 3500 ms\n*/\n\n-- AI 会分析出问题并建议：\n-- 1. orders 表全表扫描 - 需要复合索引\n-- 2. 建议创建索引：\nCREATE INDEX idx_orders_status_created ON orders(status, created_at DESC);\n\n-- 3. 如果 status 选择性不高，考虑部分索引：\nCREATE INDEX idx_orders_pending ON orders(created_at DESC) \nWHERE status = 'pending';\n","sql",[3289],"language-sql",[3291],{"type":26,"tag":254,"props":3292,"children":3293},{"__ignoreMap":7},[3294],{"type":31,"value":3286},{"type":26,"tag":91,"props":3296,"children":3298},{"id":3297},"第五部分复杂-bug-排查",[3299],{"type":31,"value":3300},"第五部分：复杂 Bug 排查",{"type":26,"tag":1205,"props":3302,"children":3304},{"id":3303},"_51-竞态条件",[3305],{"type":31,"value":3306},"5.1 竞态条件",{"type":26,"tag":247,"props":3308,"children":3311},{"code":3309,"language":3146,"meta":7,"className":3310},"// 场景：偶发的数据不一致问题\n\n// 提问方式：\n/**\n * 用户反馈偶尔看到错误的账户余额，但刷新后正常。\n * 怀疑是竞态条件，以下是相关代码：\n */\nasync function updateBalance(userId: string, amount: number) {\n  // 读取当前余额\n  const user = await db.users.findOne({ id: userId });\n  const newBalance = user.balance + amount;\n  \n  // 更新余额\n  await db.users.update({ id: userId }, { balance: newBalance });\n  \n  // 记录交易\n  await db.transactions.create({\n    userId,\n    amount,\n    balanceAfter: newBalance,\n    createdAt: new Date()\n  });\n  \n  return newBalance;\n}\n\n// 并发调用场景：\n// 用户同时发起两笔交易：+100 和 -50\n// 期望结果：原余额 1000 → 1050\n// 实际可能：原余额 1000 → 1100 或 950\n\n// AI 会分析竞态条件并提供解决方案：\nasync function updateBalanceAtomic(userId: string, amount: number) {\n  // 方案 1：使用数据库原子操作\n  const result = await db.users.findOneAndUpdate(\n    { id: userId },\n    { $inc: { balance: amount } },\n    { returnDocument: 'after' }\n  );\n  \n  await db.transactions.create({\n    userId,\n    amount,\n    balanceAfter: result.balance,\n    createdAt: new Date()\n  });\n  \n  return result.balance;\n}\n\n// 方案 2：使用乐观锁\nasync function updateBalanceOptimistic(userId: string, amount: number) {\n  const maxRetries = 3;\n  \n  for (let i = 0; i \u003C maxRetries; i++) {\n    const user = await db.users.findOne({ id: userId });\n    const newBalance = user.balance + amount;\n    \n    const updated = await db.users.updateOne(\n      { id: userId, version: user.version },\n      { balance: newBalance, version: user.version + 1 }\n    );\n    \n    if (updated.modifiedCount === 1) {\n      await db.transactions.create({...});\n      return newBalance;\n    }\n    \n    // 版本冲突，重试\n    await sleep(10 * (i + 1));\n  }\n  \n  throw new Error('Update failed after retries');\n}\n",[3148],[3312],{"type":26,"tag":254,"props":3313,"children":3314},{"__ignoreMap":7},[3315],{"type":31,"value":3309},{"type":26,"tag":1205,"props":3317,"children":3319},{"id":3318},"_52-分布式系统问题",[3320],{"type":31,"value":3321},"5.2 分布式系统问题",{"type":26,"tag":247,"props":3323,"children":3326},{"code":3324,"language":3146,"meta":7,"className":3325},"// 场景：微服务间的数据不一致\n\n// 提问方式：\n/**\n * 订单服务和库存服务偶尔出现数据不一致：\n * - 订单显示已创建\n * - 库存未扣减\n * \n * 当前流程：\n */\n// Order Service\nasync function createOrder(orderData) {\n  // 1. 调用库存服务扣减库存\n  await inventoryService.deduct(orderData.items);\n  \n  // 2. 创建订单\n  const order = await orderRepository.create(orderData);\n  \n  // 3. 发送订单创建事件\n  await eventBus.publish('order.created', order);\n  \n  return order;\n}\n\n// 问题分析：如果步骤 2 或 3 失败，库存已经扣减但订单未创建\n\n// AI 会建议使用 Saga 模式或事务发件箱模式\n",[3148],[3327],{"type":26,"tag":254,"props":3328,"children":3329},{"__ignoreMap":7},[3330],{"type":31,"value":3324},{"type":26,"tag":91,"props":3332,"children":3334},{"id":3333},"第六部分ai-调试工作流",[3335],{"type":31,"value":3336},"第六部分：AI 调试工作流",{"type":26,"tag":1205,"props":3338,"children":3340},{"id":3339},"_61-我的调试流程",[3341],{"type":31,"value":3342},"6.1 我的调试流程",{"type":26,"tag":247,"props":3344,"children":3346},{"code":3345},"┌────────────────────────────────────────────────────────────┐\n│                    AI 辅助调试工作流                         │\n├────────────────────────────────────────────────────────────┤\n│                                                            │\n│  Step 1: 问题收集                                          │\n│  ├── 复制完整错误信息                                       │\n│  ├── 截图相关日志                                          │\n│  └── 记录复现步骤                                          │\n│                                                            │\n│  Step 2: 快速分析                                          │\n│  ├── 将错误信息发给 AI                                      │\n│  ├── 获取可能原因列表                                       │\n│  └── 评估哪些最可能                                         │\n│                                                            │\n│  Step 3: 深入调查                                          │\n│  ├── 根据 AI 建议添加日志/断点                              │\n│  ├── 收集更多信息                                          │\n│  └── 再次询问 AI（带新信息）                                │\n│                                                            │\n│  Step 4: 验证修复                                          │\n│  ├── AI 生成修复代码                                        │\n│  ├── 人工审查确认                                          │\n│  └── 测试验证                                               │\n│                                                            │\n│  Step 5: 预防措施                                          │\n│  ├── AI 建议类似问题的预防方法                              │\n│  ├── 添加相关测试用例                                       │\n│  └── 更新文档/知识库                                        │\n│                                                            │\n└────────────────────────────────────────────────────────────┘\n",[3347],{"type":26,"tag":254,"props":3348,"children":3349},{"__ignoreMap":7},[3350],{"type":31,"value":3345},{"type":26,"tag":1205,"props":3352,"children":3354},{"id":3353},"_62-调试对话模板",[3355],{"type":31,"value":3356},"6.2 调试对话模板",{"type":26,"tag":247,"props":3358,"children":3361},{"code":3359,"language":758,"meta":7,"className":3360},"## 第一轮：问题描述\n\n我遇到了一个问题：[简述问题]\n\n错误信息：\n",[2999],[3362],{"type":26,"tag":254,"props":3363,"children":3364},{"__ignoreMap":7},[3365],{"type":31,"value":3359},{"type":26,"tag":27,"props":3367,"children":3368},{},[3369],{"type":26,"tag":3009,"props":3370,"children":3371},{},[3372],{"type":31,"value":3373},"粘贴完整错误",{"type":26,"tag":247,"props":3375,"children":3377},{"code":3376},"\n相关代码：\n```javascript\n[粘贴代码]\n",[3378],{"type":26,"tag":254,"props":3379,"children":3380},{"__ignoreMap":7},[3381],{"type":31,"value":3376},{"type":26,"tag":879,"props":3383,"children":3384},{},[],{"type":26,"tag":91,"props":3386,"children":3388},{"id":3387},"第二轮补充信息",[3389],{"type":31,"value":3390},"第二轮：补充信息",{"type":26,"tag":27,"props":3392,"children":3393},{},[3394],{"type":31,"value":3395},"根据你的建议，我添加了日志，发现：",{"type":26,"tag":461,"props":3397,"children":3398},{},[3399,3407],{"type":26,"tag":43,"props":3400,"children":3401},{},[3402],{"type":26,"tag":3009,"props":3403,"children":3404},{},[3405],{"type":31,"value":3406},"发现 1",{"type":26,"tag":43,"props":3408,"children":3409},{},[3410],{"type":26,"tag":3009,"props":3411,"children":3412},{},[3413],{"type":31,"value":3414},"发现 2",{"type":26,"tag":27,"props":3416,"children":3417},{},[3418,3420,3425],{"type":31,"value":3419},"这是否说明问题出在 ",{"type":26,"tag":3009,"props":3421,"children":3422},{},[3423],{"type":31,"value":3424},"你的猜测",{"type":31,"value":3426},"？",{"type":26,"tag":879,"props":3428,"children":3429},{},[],{"type":26,"tag":91,"props":3431,"children":3433},{"id":3432},"第三轮确认修复",[3434],{"type":31,"value":3435},"第三轮：确认修复",{"type":26,"tag":27,"props":3437,"children":3438},{},[3439],{"type":31,"value":3440},"我按照你的建议修改了代码：",{"type":26,"tag":247,"props":3442,"children":3445},{"code":3443,"language":3171,"meta":7,"className":3444},"[粘贴修改后的代码]\n",[3173],[3446],{"type":26,"tag":254,"props":3447,"children":3448},{"__ignoreMap":7},[3449],{"type":31,"value":3443},{"type":26,"tag":27,"props":3451,"children":3452},{},[3453],{"type":31,"value":3454},"请确认这个修复是否正确，以及是否有其他潜在问题。",{"type":26,"tag":879,"props":3456,"children":3457},{},[],{"type":26,"tag":91,"props":3459,"children":3461},{"id":3460},"第四轮预防",[3462],{"type":31,"value":3463},"第四轮：预防",{"type":26,"tag":27,"props":3465,"children":3466},{},[3467],{"type":31,"value":3468},"这个问题已解决。请建议：",{"type":26,"tag":39,"props":3470,"children":3471},{},[3472,3477,3482],{"type":26,"tag":43,"props":3473,"children":3474},{},[3475],{"type":31,"value":3476},"如何防止类似问题再次发生？",{"type":26,"tag":43,"props":3478,"children":3479},{},[3480],{"type":31,"value":3481},"应该添加什么测试用例？",{"type":26,"tag":43,"props":3483,"children":3484},{},[3485],{"type":31,"value":3486},"有什么最佳实践可以参考？",{"type":26,"tag":247,"props":3488,"children":3490},{"code":3489},"\n## 结语：AI 是放大器，不是替代品\n\nAI 调试工具能够显著加速问题排查过程，但它不能替代你的思考。最有价值的能力组合是：\n\n- **你的领域知识** + **AI 的广博见识**\n- **你对项目的理解** + **AI 的分析能力**\n- **你的判断力** + **AI 的执行速度**\n\n调试的本质是假设-验证的循环。AI 帮你更快地生成假设、更高效地验证假设，但做出最终判断的还是你。\n\n学会与 AI 高效协作调试，不是依赖 AI 给你答案，而是让 AI 帮你更快地找到自己的答案。\n\n---\n\n## 参考资源\n\n- [Chrome DevTools 官方文档](https://developer.chrome.com/docs/devtools)\n- [Node.js 调试指南](https://nodejs.org/en/docs/guides/debugging-getting-started)\n- [React DevTools 使用指南](https://react.dev/learn/react-developer-tools)\n",[3491],{"type":26,"tag":254,"props":3492,"children":3493},{"__ignoreMap":7},[3494],{"type":31,"value":3489},{"title":7,"searchDepth":746,"depth":746,"links":3496},[3497,3498,3499,3504,3508,3513,3517,3521,3522,3523],{"id":2880,"depth":749,"text":2883},{"id":2886,"depth":749,"text":2889},{"id":2907,"depth":749,"text":2910,"children":3500},[3501,3502,3503],{"id":2913,"depth":746,"text":2916},{"id":2991,"depth":746,"text":2994},{"id":3156,"depth":746,"text":3159},{"id":3198,"depth":749,"text":3201,"children":3505},[3506,3507],{"id":3204,"depth":746,"text":3207},{"id":3224,"depth":746,"text":3227},{"id":3244,"depth":749,"text":3247,"children":3509},[3510,3511,3512],{"id":3250,"depth":746,"text":3253},{"id":3265,"depth":746,"text":3268},{"id":3280,"depth":746,"text":3283},{"id":3297,"depth":749,"text":3300,"children":3514},[3515,3516],{"id":3303,"depth":746,"text":3306},{"id":3318,"depth":746,"text":3321},{"id":3333,"depth":749,"text":3336,"children":3518},[3519,3520],{"id":3339,"depth":746,"text":3342},{"id":3353,"depth":746,"text":3356},{"id":3387,"depth":749,"text":3390},{"id":3432,"depth":749,"text":3435},{"id":3460,"depth":749,"text":3463},"content:topics:ai:ai-debugging-troubleshooting-guide.md","topics/ai/ai-debugging-troubleshooting-guide.md","topics/ai/ai-debugging-troubleshooting-guide",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"topic":5,"author":11,"tags":3528,"image":17,"imageQuery":18,"pexelsPhotoId":19,"pexelsUrl":20,"featured":6,"readingTime":21,"body":3529,"_type":758,"_id":759,"_source":760,"_file":761,"_stem":762,"_extension":763},[13,14,15,16],{"type":23,"children":3530,"toc":4105},[3531,3535,3539,3562,3576,3580,3584,3683,3687,3691,3695,3699,3707,3711,3715,3719,3738,3742,3750,3754,3758,3762,3861,3865,3869,3873,3896,3900,3908,3912,3916,3920,3947,3951,3959,3963,3967,3971,3975,3994,3998,4002,4062,4066,4070,4074],{"type":26,"tag":27,"props":3532,"children":3533},{},[3534],{"type":31,"value":32},{"type":26,"tag":27,"props":3536,"children":3537},{},[3538],{"type":31,"value":37},{"type":26,"tag":39,"props":3540,"children":3541},{},[3542,3546,3550,3554,3558],{"type":26,"tag":43,"props":3543,"children":3544},{},[3545],{"type":31,"value":47},{"type":26,"tag":43,"props":3547,"children":3548},{},[3549],{"type":31,"value":52},{"type":26,"tag":43,"props":3551,"children":3552},{},[3553],{"type":31,"value":57},{"type":26,"tag":43,"props":3555,"children":3556},{},[3557],{"type":31,"value":62},{"type":26,"tag":43,"props":3559,"children":3560},{},[3561],{"type":31,"value":67},{"type":26,"tag":27,"props":3563,"children":3564},{},[3565,3566,3570,3571,3575],{"type":31,"value":72},{"type":26,"tag":74,"props":3567,"children":3568},{"href":76},[3569],{"type":31,"value":79},{"type":31,"value":81},{"type":26,"tag":74,"props":3572,"children":3573},{"href":84},[3574],{"type":31,"value":87},{"type":31,"value":89},{"type":26,"tag":91,"props":3577,"children":3578},{"id":93},[3579],{"type":31,"value":96},{"type":26,"tag":27,"props":3581,"children":3582},{},[3583],{"type":31,"value":101},{"type":26,"tag":103,"props":3585,"children":3586},{},[3587,3605],{"type":26,"tag":107,"props":3588,"children":3589},{},[3590],{"type":26,"tag":111,"props":3591,"children":3592},{},[3593,3597,3601],{"type":26,"tag":115,"props":3594,"children":3595},{},[3596],{"type":31,"value":119},{"type":26,"tag":115,"props":3598,"children":3599},{},[3600],{"type":31,"value":124},{"type":26,"tag":115,"props":3602,"children":3603},{},[3604],{"type":31,"value":129},{"type":26,"tag":131,"props":3606,"children":3607},{},[3608,3623,3638,3653,3668],{"type":26,"tag":111,"props":3609,"children":3610},{},[3611,3615,3619],{"type":26,"tag":138,"props":3612,"children":3613},{},[3614],{"type":31,"value":142},{"type":26,"tag":138,"props":3616,"children":3617},{},[3618],{"type":31,"value":147},{"type":26,"tag":138,"props":3620,"children":3621},{},[3622],{"type":31,"value":152},{"type":26,"tag":111,"props":3624,"children":3625},{},[3626,3630,3634],{"type":26,"tag":138,"props":3627,"children":3628},{},[3629],{"type":31,"value":160},{"type":26,"tag":138,"props":3631,"children":3632},{},[3633],{"type":31,"value":165},{"type":26,"tag":138,"props":3635,"children":3636},{},[3637],{"type":31,"value":170},{"type":26,"tag":111,"props":3639,"children":3640},{},[3641,3645,3649],{"type":26,"tag":138,"props":3642,"children":3643},{},[3644],{"type":31,"value":178},{"type":26,"tag":138,"props":3646,"children":3647},{},[3648],{"type":31,"value":183},{"type":26,"tag":138,"props":3650,"children":3651},{},[3652],{"type":31,"value":188},{"type":26,"tag":111,"props":3654,"children":3655},{},[3656,3660,3664],{"type":26,"tag":138,"props":3657,"children":3658},{},[3659],{"type":31,"value":196},{"type":26,"tag":138,"props":3661,"children":3662},{},[3663],{"type":31,"value":201},{"type":26,"tag":138,"props":3665,"children":3666},{},[3667],{"type":31,"value":206},{"type":26,"tag":111,"props":3669,"children":3670},{},[3671,3675,3679],{"type":26,"tag":138,"props":3672,"children":3673},{},[3674],{"type":31,"value":214},{"type":26,"tag":138,"props":3676,"children":3677},{},[3678],{"type":31,"value":219},{"type":26,"tag":138,"props":3680,"children":3681},{},[3682],{"type":31,"value":224},{"type":26,"tag":27,"props":3684,"children":3685},{},[3686],{"type":31,"value":229},{"type":26,"tag":91,"props":3688,"children":3689},{"id":232},[3690],{"type":31,"value":235},{"type":26,"tag":27,"props":3692,"children":3693},{},[3694],{"type":31,"value":240},{"type":26,"tag":27,"props":3696,"children":3697},{},[3698],{"type":31,"value":245},{"type":26,"tag":247,"props":3700,"children":3702},{"className":3701,"code":251,"language":31,"meta":7},[250],[3703],{"type":26,"tag":254,"props":3704,"children":3705},{"__ignoreMap":7},[3706],{"type":31,"value":251},{"type":26,"tag":27,"props":3708,"children":3709},{},[3710],{"type":31,"value":262},{"type":26,"tag":91,"props":3712,"children":3713},{"id":265},[3714],{"type":31,"value":268},{"type":26,"tag":27,"props":3716,"children":3717},{},[3718],{"type":31,"value":273},{"type":26,"tag":39,"props":3720,"children":3721},{},[3722,3726,3730,3734],{"type":26,"tag":43,"props":3723,"children":3724},{},[3725],{"type":31,"value":281},{"type":26,"tag":43,"props":3727,"children":3728},{},[3729],{"type":31,"value":286},{"type":26,"tag":43,"props":3731,"children":3732},{},[3733],{"type":31,"value":291},{"type":26,"tag":43,"props":3735,"children":3736},{},[3737],{"type":31,"value":296},{"type":26,"tag":27,"props":3739,"children":3740},{},[3741],{"type":31,"value":301},{"type":26,"tag":247,"props":3743,"children":3745},{"className":3744,"code":305,"language":31,"meta":7},[250],[3746],{"type":26,"tag":254,"props":3747,"children":3748},{"__ignoreMap":7},[3749],{"type":31,"value":305},{"type":26,"tag":27,"props":3751,"children":3752},{},[3753],{"type":31,"value":315},{"type":26,"tag":91,"props":3755,"children":3756},{"id":318},[3757],{"type":31,"value":321},{"type":26,"tag":27,"props":3759,"children":3760},{},[3761],{"type":31,"value":326},{"type":26,"tag":103,"props":3763,"children":3764},{},[3765,3783],{"type":26,"tag":107,"props":3766,"children":3767},{},[3768],{"type":26,"tag":111,"props":3769,"children":3770},{},[3771,3775,3779],{"type":26,"tag":115,"props":3772,"children":3773},{},[3774],{"type":31,"value":340},{"type":26,"tag":115,"props":3776,"children":3777},{},[3778],{"type":31,"value":345},{"type":26,"tag":115,"props":3780,"children":3781},{},[3782],{"type":31,"value":350},{"type":26,"tag":131,"props":3784,"children":3785},{},[3786,3801,3816,3831,3846],{"type":26,"tag":111,"props":3787,"children":3788},{},[3789,3793,3797],{"type":26,"tag":138,"props":3790,"children":3791},{},[3792],{"type":31,"value":361},{"type":26,"tag":138,"props":3794,"children":3795},{},[3796],{"type":31,"value":366},{"type":26,"tag":138,"props":3798,"children":3799},{},[3800],{"type":31,"value":371},{"type":26,"tag":111,"props":3802,"children":3803},{},[3804,3808,3812],{"type":26,"tag":138,"props":3805,"children":3806},{},[3807],{"type":31,"value":379},{"type":26,"tag":138,"props":3809,"children":3810},{},[3811],{"type":31,"value":384},{"type":26,"tag":138,"props":3813,"children":3814},{},[3815],{"type":31,"value":389},{"type":26,"tag":111,"props":3817,"children":3818},{},[3819,3823,3827],{"type":26,"tag":138,"props":3820,"children":3821},{},[3822],{"type":31,"value":397},{"type":26,"tag":138,"props":3824,"children":3825},{},[3826],{"type":31,"value":402},{"type":26,"tag":138,"props":3828,"children":3829},{},[3830],{"type":31,"value":407},{"type":26,"tag":111,"props":3832,"children":3833},{},[3834,3838,3842],{"type":26,"tag":138,"props":3835,"children":3836},{},[3837],{"type":31,"value":415},{"type":26,"tag":138,"props":3839,"children":3840},{},[3841],{"type":31,"value":420},{"type":26,"tag":138,"props":3843,"children":3844},{},[3845],{"type":31,"value":425},{"type":26,"tag":111,"props":3847,"children":3848},{},[3849,3853,3857],{"type":26,"tag":138,"props":3850,"children":3851},{},[3852],{"type":31,"value":433},{"type":26,"tag":138,"props":3854,"children":3855},{},[3856],{"type":31,"value":438},{"type":26,"tag":138,"props":3858,"children":3859},{},[3860],{"type":31,"value":443},{"type":26,"tag":27,"props":3862,"children":3863},{},[3864],{"type":31,"value":448},{"type":26,"tag":91,"props":3866,"children":3867},{"id":451},[3868],{"type":31,"value":454},{"type":26,"tag":27,"props":3870,"children":3871},{},[3872],{"type":31,"value":459},{"type":26,"tag":461,"props":3874,"children":3875},{},[3876,3880,3884,3888,3892],{"type":26,"tag":43,"props":3877,"children":3878},{},[3879],{"type":31,"value":468},{"type":26,"tag":43,"props":3881,"children":3882},{},[3883],{"type":31,"value":473},{"type":26,"tag":43,"props":3885,"children":3886},{},[3887],{"type":31,"value":478},{"type":26,"tag":43,"props":3889,"children":3890},{},[3891],{"type":31,"value":483},{"type":26,"tag":43,"props":3893,"children":3894},{},[3895],{"type":31,"value":488},{"type":26,"tag":27,"props":3897,"children":3898},{},[3899],{"type":31,"value":493},{"type":26,"tag":247,"props":3901,"children":3903},{"className":3902,"code":497,"language":31,"meta":7},[250],[3904],{"type":26,"tag":254,"props":3905,"children":3906},{"__ignoreMap":7},[3907],{"type":31,"value":497},{"type":26,"tag":27,"props":3909,"children":3910},{},[3911],{"type":31,"value":507},{"type":26,"tag":91,"props":3913,"children":3914},{"id":510},[3915],{"type":31,"value":513},{"type":26,"tag":27,"props":3917,"children":3918},{},[3919],{"type":31,"value":518},{"type":26,"tag":39,"props":3921,"children":3922},{},[3923,3927,3931,3935,3939,3943],{"type":26,"tag":43,"props":3924,"children":3925},{},[3926],{"type":31,"value":526},{"type":26,"tag":43,"props":3928,"children":3929},{},[3930],{"type":31,"value":531},{"type":26,"tag":43,"props":3932,"children":3933},{},[3934],{"type":31,"value":536},{"type":26,"tag":43,"props":3936,"children":3937},{},[3938],{"type":31,"value":541},{"type":26,"tag":43,"props":3940,"children":3941},{},[3942],{"type":31,"value":546},{"type":26,"tag":43,"props":3944,"children":3945},{},[3946],{"type":31,"value":551},{"type":26,"tag":27,"props":3948,"children":3949},{},[3950],{"type":31,"value":556},{"type":26,"tag":247,"props":3952,"children":3954},{"className":3953,"code":560,"language":31,"meta":7},[250],[3955],{"type":26,"tag":254,"props":3956,"children":3957},{"__ignoreMap":7},[3958],{"type":31,"value":560},{"type":26,"tag":27,"props":3960,"children":3961},{},[3962],{"type":31,"value":570},{"type":26,"tag":91,"props":3964,"children":3965},{"id":573},[3966],{"type":31,"value":576},{"type":26,"tag":27,"props":3968,"children":3969},{},[3970],{"type":31,"value":581},{"type":26,"tag":27,"props":3972,"children":3973},{},[3974],{"type":31,"value":586},{"type":26,"tag":461,"props":3976,"children":3977},{},[3978,3982,3986,3990],{"type":26,"tag":43,"props":3979,"children":3980},{},[3981],{"type":31,"value":594},{"type":26,"tag":43,"props":3983,"children":3984},{},[3985],{"type":31,"value":599},{"type":26,"tag":43,"props":3987,"children":3988},{},[3989],{"type":31,"value":604},{"type":26,"tag":43,"props":3991,"children":3992},{},[3993],{"type":31,"value":609},{"type":26,"tag":27,"props":3995,"children":3996},{},[3997],{"type":31,"value":614},{"type":26,"tag":91,"props":3999,"children":4000},{"id":617},[4001],{"type":31,"value":620},{"type":26,"tag":461,"props":4003,"children":4005},{"className":4004},[624],[4006,4014,4022,4030,4038,4046,4054],{"type":26,"tag":43,"props":4007,"children":4009},{"className":4008},[629],[4010,4013],{"type":26,"tag":632,"props":4011,"children":4012},{"disabled":634,"type":635},[],{"type":31,"value":638},{"type":26,"tag":43,"props":4015,"children":4017},{"className":4016},[629],[4018,4021],{"type":26,"tag":632,"props":4019,"children":4020},{"disabled":634,"type":635},[],{"type":31,"value":647},{"type":26,"tag":43,"props":4023,"children":4025},{"className":4024},[629],[4026,4029],{"type":26,"tag":632,"props":4027,"children":4028},{"disabled":634,"type":635},[],{"type":31,"value":656},{"type":26,"tag":43,"props":4031,"children":4033},{"className":4032},[629],[4034,4037],{"type":26,"tag":632,"props":4035,"children":4036},{"disabled":634,"type":635},[],{"type":31,"value":665},{"type":26,"tag":43,"props":4039,"children":4041},{"className":4040},[629],[4042,4045],{"type":26,"tag":632,"props":4043,"children":4044},{"disabled":634,"type":635},[],{"type":31,"value":674},{"type":26,"tag":43,"props":4047,"children":4049},{"className":4048},[629],[4050,4053],{"type":26,"tag":632,"props":4051,"children":4052},{"disabled":634,"type":635},[],{"type":31,"value":683},{"type":26,"tag":43,"props":4055,"children":4057},{"className":4056},[629],[4058,4061],{"type":26,"tag":632,"props":4059,"children":4060},{"disabled":634,"type":635},[],{"type":31,"value":692},{"type":26,"tag":91,"props":4063,"children":4064},{"id":695},[4065],{"type":31,"value":695},{"type":26,"tag":27,"props":4067,"children":4068},{},[4069],{"type":31,"value":702},{"type":26,"tag":27,"props":4071,"children":4072},{},[4073],{"type":31,"value":707},{"type":26,"tag":461,"props":4075,"children":4076},{},[4077,4084,4091,4098],{"type":26,"tag":43,"props":4078,"children":4079},{},[4080],{"type":26,"tag":74,"props":4081,"children":4082},{"href":84},[4083],{"type":31,"value":87},{"type":26,"tag":43,"props":4085,"children":4086},{},[4087],{"type":26,"tag":74,"props":4088,"children":4089},{"href":723},[4090],{"type":31,"value":726},{"type":26,"tag":43,"props":4092,"children":4093},{},[4094],{"type":26,"tag":74,"props":4095,"children":4096},{"href":732},[4097],{"type":31,"value":735},{"type":26,"tag":43,"props":4099,"children":4100},{},[4101],{"type":26,"tag":74,"props":4102,"children":4103},{"href":741},[4104],{"type":31,"value":744},{"title":7,"searchDepth":746,"depth":746,"links":4106},[4107,4108,4109,4110,4111,4112,4113,4114,4115],{"id":93,"depth":749,"text":96},{"id":232,"depth":749,"text":235},{"id":265,"depth":749,"text":268},{"id":318,"depth":749,"text":321},{"id":451,"depth":749,"text":454},{"id":510,"depth":749,"text":513},{"id":573,"depth":749,"text":576},{"id":617,"depth":749,"text":620},{"id":695,"depth":749,"text":695},1777903488417]