Graham Quince's Tutorial to Debug After Effects Expressions in console.log

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

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.

Some contents or functionalities here are not available due to your cookie preferences!

This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

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


Related COW Tutorials

Unreal Engine for video – landscape sculpting
Welcome to my series on learning Unreal Engine for Adobe After Effects …
Unreal Engine for video production – getting started
Welcome to my series on learning Unreal Engine for After Effects users. …

###

Enjoying this tutorial? Sign up for the Creative COW Newsletter!

Sign up for the Creative COW newsletter and get weekly updates on industry news, forum highlights, jobs, inspirational tutorials, tips, burning questions, and more! Receive bulletins from the largest, longest-running community dedicated to supporting professionals working in film, video, and audio.

Enter your email address, and your first and last name below!

Sign up:

* indicates required

Responses

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy