> For the complete documentation index, see [llms.txt](https://sparkar-community.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sparkar-community.gitbook.io/docs/diagnosticsmodule.md).

# DiagnosticsModule

The `DiagnosticsModule` class enables diagnostic logging.

## Example

```
//==============================================================================
// The following example demonstrates how to log messages to the Console and
// watch signal values.
//==============================================================================

// Load in the required modules
const Diagnostics = require('Diagnostics');
const FaceTracking = require('FaceTracking');
const Scene = require('Scene');

// Log a message to the Console
Diagnostics.log('Console message logged from the script.');

// Watch a signal's value in the Console
Diagnostics.watch("Mouth Openness - ", FaceTracking.face(0).mouth.openness);
```

## Properties

This module exposes no properties.

## Methods

| Method                | Description                                                                                                                                                                                                                                        |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `getModuleNames`      | <p><code>getModuleNames(): Array\<string></code></p><p>Returns an array of names of all the scripting modules that can be loaded through a <code>require</code> call. Note: This set of modules is based on the list of enabled capabilities.</p>  |
| `getTypeDescriptions` | <p><code>getTypeDescriptions(): Array\<string></code></p><p>Finds the descriptions for each type in the effect.</p>                                                                                                                                |
| `log`                 | <p><code>log(content: Object): void</code></p><p>Flattens content to a string and prints it to the debug console. Note: this function can be reassigned to any var (i.e. <code>foo.log = Diagnostics.log;</code>)</p>                              |
| `watch`               | <p><code>watch(tag: String, signal:BoolSignal): void watch(tag: String, signal:ScalarSignal): void watch(tag: String, signal:StringSignal): void</code></p><p>Adds the specified signal to the watch view in AR Studio with the specified tag.</p> |

## Classes

This module exposes no classes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sparkar-community.gitbook.io/docs/diagnosticsmodule.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
