[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/script-host](https://jsprismarine.dev/api/@jsprismarine/script-host/index.md) / debugger/thread

# debugger/thread

## Classes

- [DebuggerThread](https://jsprismarine.dev/api/@jsprismarine/script-host/debugger/thread/classes/DebuggerThread.md)

## Interfaces

### DebuggerThreadConnection

Defined in: [script-host/src/debugger/thread.ts:17](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/debugger/thread.ts#L17)

A connection the socket thread made or accepted.

#### Properties

##### address

> `readonly` **address**: `string`

Defined in: [script-host/src/debugger/thread.ts:21](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/debugger/thread.ts#L21)

The extension's IP address.

##### endpoint

> `readonly` **endpoint**: [`DebuggerChannelEndpoint`](https://jsprismarine.dev/api/@jsprismarine/script-host/debugger/channel/index.md#debuggerchannelendpoint)

Defined in: [script-host/src/debugger/thread.ts:19](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/debugger/thread.ts#L19)

The end of the channel to the extension that a [PortDebuggerChannel](https://jsprismarine.dev/api/@jsprismarine/script-host/debugger/channel/classes/PortDebuggerChannel.md) wraps.

##### port

> `readonly` **port**: `number`

Defined in: [script-host/src/debugger/thread.ts:23](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/debugger/thread.ts#L23)

The extension's port.

***

### DebuggerThreadEvents

Defined in: [script-host/src/debugger/thread.ts:27](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/debugger/thread.ts#L27)

What the socket thread tells the thread that started it. Both run on that thread's event loop.

#### Methods

##### activity()

> **activity**(): `void`

Defined in: [script-host/src/debugger/thread.ts:31](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/debugger/thread.ts#L31)

The extension sent a message, or the connection closed, so a session has something to read.

###### Returns

`void`

##### connected()

> **connected**(`connection`): `void`

Defined in: [script-host/src/debugger/thread.ts:29](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/debugger/thread.ts#L29)

A connection to the extension arrived; earlier connections have closed.

###### Parameters

###### connection

[`DebuggerThreadConnection`](#debuggerthreadconnection)

###### Returns

`void`

## Type Aliases

### DebuggerThreadMessage

> **DebuggerThreadMessage** = \{ `error?`: `string`; `id`: `number`; `kind`: `"reply"`; `port?`: `number`; \} \| \{ `connection`: [`DebuggerThreadConnection`](#debuggerthreadconnection); `kind`: `"connected"`; \} \| \{ `kind`: `"activity"`; \}

Defined in: [script-host/src/debugger/thread.ts:41](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/debugger/thread.ts#L41)

A message from the socket thread.

***

### DebuggerThreadRequest

> **DebuggerThreadRequest** = \{ `id`: `number`; `op`: `"listen"`; `options`: [`ListenOptions`](https://jsprismarine.dev/api/@jsprismarine/script-host/debugger/transport/index.md#listenoptions); \} \| \{ `id`: `number`; `op`: `"connect"`; `options`: [`ConnectOptions`](https://jsprismarine.dev/api/@jsprismarine/script-host/debugger/transport/index.md#connectoptions); \} \| \{ `id`: `number`; `op`: `"close"`; \}

Defined in: [script-host/src/debugger/thread.ts:35](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/debugger/thread.ts#L35)

A request to the socket thread.
