{"record":{"id":"3365c42529a37f3f","repo":"greensock/GSAP","slug":"gsdevtools-can-t-work-with-scrolltrigger-based-ani","errorCode":null,"errorMessage":"GSDevTools can't work with ScrollTrigger-based animations; either the scrollbar -OR- the GSDevTools scrubber can control the animation.","messagePattern":"GSDevTools can't work with ScrollTrigger-based animations; either the scrollbar -OR- the GSDevTools scrubber can control the animation\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/GSDevTools.js","lineNumber":759,"sourceCode":"\t\t\t\tfor (; i < options.length; i++) {\n\t\t\t\t\tlist.removeChild(options[i]);\n\t\t\t\t}\n\t\t\t},\n\t\t\tanimation = function(anim) {\n\t\t\t\tlet ts = parseFloat(timeScale.options[timeScale.selectedIndex].value) || 1,\n\t\t\t\t\ttl, maxDuration;\n\t\t\t\tif (!arguments.length) {\n\t\t\t\t\treturn selectedAnimation;\n\t\t\t\t}\n\t\t\t\tif (_isString(anim)) {\n\t\t\t\t\tanim = _getAnimationById(anim);\n\t\t\t\t}\n\t\t\t\t//console.log(\"animation() \", anim.vars.id);\n\t\t\t\tif (!(anim instanceof Animation)) {\n\t\t\t\t\tconsole.warn(\"GSDevTools error: invalid animation.\");\n\t\t\t\t}\n\t\t\t\tif (anim.scrollTrigger) {\n\t\t\t\t\tconsole.warn(\"GSDevTools can't work with ScrollTrigger-based animations; either the scrollbar -OR- the GSDevTools scrubber can control the animation.\");\n\t\t\t\t}\n\t\t\t\tif (anim === selectedAnimation) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (selectedAnimation) {\n\t\t\t\t\tselectedAnimation._inProgress = inProgress;\n\t\t\t\t\tselectedAnimation._outProgress = outProgress;\n\t\t\t\t}\n\t\t\t\tselectedAnimation = anim;\n\t\t\t\tif (linkedAnimation) {\n\t\t\t\t\tts = linkedAnimation.timeScale();\n\t\t\t\t\tif (linkedAnimation._targets && linkedAnimation._targets[0] === declaredAnimation) {\n\t\t\t\t\t\tdeclaredAnimation.resume();\n\t\t\t\t\t\tlinkedAnimation.kill();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinProgress = selectedAnimation._inProgress || 0;\n\t\t\t\toutProgress = selectedAnimation._outProgress || 100;","sourceCodeStart":741,"sourceCodeEnd":777,"githubUrl":"https://github.com/greensock/GSAP/blob/13e2b790546426a1a2e0e9b409f3f8dc6d6611f2/src/GSDevTools.js#L741-L777","documentation":"GSDevTools' scrubber and ScrollTrigger's scroll-driven scrubbing both want to control the animation's progress, so using both on the same animation is unsupported. When the animation assigned to GSDevTools has a scrollTrigger attached, GSDevTools warns that only one controller can own playback.","triggerScenarios":"Passing an animation with anim.scrollTrigger set to GSDevTools via vars.animation, or via id lookup (getByAnimation), while ScrollTrigger scrub is attached to that same tween/timeline.","commonSituations":"Adding GSDevTools to an existing ScrollTrigger-scrubbed timeline for debugging; creating a timeline, attaching ScrollTrigger, then wiring it into GSDevTools; confetti of scroll-scrub demos that later get dev tools attached.","solutions":["Detach ScrollTrigger from the animation before handing it to GSDevTools","Create a separate non-scroll-linked copy of the animation for GSDevTools debugging","Use ScrollTrigger's own onEnter/onUpdate callbacks plus GSDevTools on an unlinked timeline"],"exampleFix":"// before\ngsap.registerPlugin(GSDevTools, ScrollTrigger);\nconst tl = gsap.timeline({ scrollTrigger: { trigger: '.section', scrub: true } });\nGSDevTools.create({ animation: tl }); // warning\n// after\nconst tl = gsap.timeline(); // no scrollTrigger\nGSDevTools.create({ animation: tl });","handlingStrategy":"validation","validationCode":"if (animation.scrollTrigger) { console.error('Remove ScrollTrigger before attaching GSDevTools'); } else { GSDevTools.create({ animation }); }","typeGuard":"const canUseDevTools = (anim) => anim && !anim.scrollTrigger;","tryCatchPattern":null,"preventionTips":["Never attach GSDevTools to scrubbed ScrollTrigger timelines","Debug ScrollTrigger animations by temporarily removing the scrollTrigger config","Keep a separate unlinked copy of timelines used with GSDevTools"],"tags":["gsap","scrolltrigger","incompatible-config"],"backgroundTag":"conflicting-animation-controllers","analyzedSha":"13e2b790546426a1a2e0e9b409f3f8dc6d6611f2","analyzedAt":"2026-08-29T08:34:05.027Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}