MenuTimeline / The Call Stack

Docs / Timeline

The Call Stack JSpark+

In JSpark+, the Call Stack shows which function called which, at every Step.

On this page

The Call Stack is a Timeline Panel in JSpark+. Turn it on with the Call stack button on the Timeline bar, or View → Timeline Panels → Call Stack. In JSpark, the button is dimmed and marked +, and clicking it says what JSpark+ adds. For what else JSpark+ adds, see JSpark+.

Read the Call Stack

Each call is a box. The call running at this Step is on top, lit. Under it is the call that made it, and so on down to global, the top level of the Snippet, at the bottom. As you move through the Steps, a call adds a box and a return takes one away.

factorial(4) calls itself down to factorial(1); each call adds a box, and each return removes one.

A box names the function and its arguments, factorial(n = 2). A function with no name is (anonymous). A box shows one line; click it to see long arguments in full. An argument that is an object stays closed until you open it.

Go to a call

The number at the right of a box is the line that call is on. For a call under the top, it is the line waiting for the call above it to return. Click the number to go to that line in the code.

Five calls deep: factorial(1) runs line 2, and each call below it waits on line 4.

Variables, beside it, lists the names the call on top can use, and their values.

The pictures show JSpark on a Mac. On Windows, the window buttons are at the top right, the menus are in theMenu button at the left end of the tabs, and shortcuts use Ctrl where a Mac uses ⌘. The rest works the same way.

Esc

Type to search every docs page.

JSpark is downloading

When you open JSpark-Setup.exe, Windows may stop it once, because the installer isn’t code-signed yet. If the file came from jspark.app:

A blue Windows box, “Windows protected your PC”: Microsoft Defender SmartScreen prevented an unrecognised app from starting. Under it, the link More info, and the button Don’t run.

1Click More info.

The same box after More info: Application JSpark-Setup-1.4.0.exe, Publisher Unknown publisher, and the buttons Run anyway and Don’t run.

2Then click Run anyway.

You see this only once: updates install inside the app. More in Install JSpark.