# Advanced Configuration

## Custom JVM Parameters

You can pass custom JVM parameters to the SeaLights instrumentation processes.

These parameters are useful when you need to:

* configure network settings
* add JVM system properties
* enable debugging
* tune memory usage

#### Example

```scala
sealightsJvmParams := Seq("-Dkey=value")
```

This configuration adds JVM parameters to the SeaLights instrumentation process.

## Test Listener JVM Parameters

You can also pass JVM parameters specifically to the Test Listener, which runs during test execution.

#### Example

```scala
sealightsTestListenerJvmParams := Seq("-Dkey=value")
```

This is useful when you need to configure JVM settings that affect test execution reporting or connectivity.

## Multiple Test Stages

SeaLights supports reporting results from multiple test stages within the same build.

For example:

* Unit Tests
* Integration Tests
* Functional Tests

You can map SBT test tasks to specific SeaLights test stages.

#### Example

```scala
testTasksAndStages := Map(
  "test" -> "Unit Tests",
  "integrationTest" -> "Integration Tests"
)
```

This allows SeaLights to group test results by stage in the SeaLights dashboard.

## Temporarily Disable SeaLights

You can temporarily disable SeaLights instrumentation without removing the configuration.

#### Option 1 — Using SBT Configuration

```scala
sealightsDisabled := Some(true)
```

#### Option 2 — Using JVM Property

```bash
-DsealightsDisabled=true
```

This can be useful when:

* troubleshooting build issues
* running local tests without instrumentation
* temporarily bypassing SeaLights in CI

## Revert SeaLights Changes

If you want to remove the SeaLights integration changes from your project, you can restore the original SBT configuration.

#### Example

```bash
java -jar sl-build-scanner.jar -restoreSbt -workspacepath /path/to/project
```

This command restores the project files modified by the SeaLights Build Scanner.
