# ScriptDebugger

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/ScriptDebugger/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/ScriptDebugger

## Properties

### CoreScriptIdentifier

```luau
ScriptDebugger.CoreScriptIdentifier: string = ""
```

- Tags: Hidden, Not scriptable

### CurrentLine

```luau
ScriptDebugger.CurrentLine: number = 0
```

- Tags: Read only

### IsDebugging

```luau
ScriptDebugger.IsDebugging: boolean = false
```

- Tags: Read only

### IsPaused

```luau
ScriptDebugger.IsPaused: boolean = false
```

- Tags: Read only

### Script

```luau
ScriptDebugger.Script: Instance
```

- Tags: Read only

### ScriptGuid

```luau
ScriptDebugger.ScriptGuid: string = ""
```

- Tags: Hidden, Not scriptable

## Methods

### AddWatch

```luau
ScriptDebugger:AddWatch(expression: string): Instance
```

### GetBreakpoints

```luau
ScriptDebugger:GetBreakpoints(): { Instance }
```

### GetGlobals

```luau
ScriptDebugger:GetGlobals(stackFrame: number? = 0): { [any]: any }
```

### GetLocals

```luau
ScriptDebugger:GetLocals(stackFrame: number? = 0): { [any]: any }
```

### GetStack

```luau
ScriptDebugger:GetStack(): { any }
```

### GetUpvalues

```luau
ScriptDebugger:GetUpvalues(stackFrame: number? = 0): { [any]: any }
```

### GetWatches

```luau
ScriptDebugger:GetWatches(): { Instance }
```

### GetWatchValue

```luau
ScriptDebugger:GetWatchValue(watch: Instance): any
```

### SetBreakpoint

```luau
ScriptDebugger:SetBreakpoint(line: number, isContextDependentBreakpoint: boolean): Instance
```

### SetGlobal

```luau
ScriptDebugger:SetGlobal(name: string, value: any, stackFrame: number)
```

### SetLocal

```luau
ScriptDebugger:SetLocal(name: string, value: any, stackFrame: number? = 0)
```

### SetUpvalue

```luau
ScriptDebugger:SetUpvalue(name: string, value: any, stackFrame: number? = 0)
```

## Events

### BreakpointAdded

```luau
ScriptDebugger.BreakpointAdded: RBXScriptSignal<(breakpoint: Instance)>
```

### BreakpointRemoved

```luau
ScriptDebugger.BreakpointRemoved: RBXScriptSignal<(breakpoint: Instance)>
```

### EncounteredBreak

```luau
ScriptDebugger.EncounteredBreak: RBXScriptSignal<(line: number, breakReason: Enum.BreakReason)>
```

### Resuming

```luau
ScriptDebugger.Resuming: RBXScriptSignal<()>
```

### WatchAdded

```luau
ScriptDebugger.WatchAdded: RBXScriptSignal<(watch: Instance)>
```

### WatchRemoved

```luau
ScriptDebugger.WatchRemoved: RBXScriptSignal<(watch: Instance)>
```

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
