Debug After Effects Expressions in console.log (sort of) @ShiveringCactus
Debug After Effects Expressions in console.log (sort of)  @ShiveringCactus
Uploaded March 2023 | Updated September 2026, 4 days ago
How to find the value of a variable quickly and easily.

When writing complex code, (such as Javascript expression in Adobe After Effects), it is often helpful to be able to see what a variable's value is. If you were using javascript in an HTML web page, you could send these values to the browser's Developer Console, using the simple code console.log(). Unfortunately, After Effects does not have the equivalent of a developer console. It does have the info panel, but you can only interact with that when writing a script. For a regular expression (or even an irregular one), I used to use a text layer and edit the sourceText to show the variable. But this was time consuming and not always easy - and quite often, it was confusing.

Instead, a much simpler approach is to throw an error. Using just the code below, the expression halts, After Effects highlights the issue and you can see the value of whatever you ask.
--------------------------------------------------------------------------------------
throw new Error( VARIABLE )

or even simpler, just:

throw VARIABLE
--------------------------------------------------------------------------------------

#AfterEffects #Expressions #tutorial

*Get ShiveringCactus VFX as phone cases, T-shirts, mugs: redbubble.com/people/ShiveringCactus/shop*

*Or buy me a coffee: ko-fi.com/shiveringcactus*

In the video, I mention that Dan Ebberts ( motionscript.com ) helped me adapt one of his expressions, you can download the preset from this list:
dropbox.com/s/26sadwh8aig3s6k/Circle%20highlight.zip?dl=1

To learn how to install presets (FFX files) check out this video: youtu.be/gMDSVJlFv5E

I'm an Adobe Community Expert - which means you can find me on the Adobe forums if you need any help. community.adobe.com/t5/after-effects/ct-p/ct-after-effects?page=1&sort=latest_replies&lang=all&tabid=all

#AdobeCommunityExperts
Debug After Effects Expressions in console.log (sort of)Heres a fun idea for a birthday video #CakeFX #shortsStream Deck+ dial responseHow to Animate a Photo in After EffectsUsing Expressions to animate in After EffectsHow to get Uniform Scale Wiggle in After EffectsAutomate Video Progress Bars in After Effects (NO KEYFRAMES!)How to render from Blender for After EffectsRecreating the Genesis Effect from Star Trek II: the Wrath of KhanSafe Zones preset for Tiktok, Shorts, Instagram and SnapchatHow to Install After Effects Plugins & Presets | Mac & WindowsTravel through a Galaxy in #360 #VR
ShiveringCactus: VFX |

Debug After Effects Expressions in console.log (sort of)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER