﻿---
title: Debug Painless scripts in Elasticsearch
description: Use the topics in this section to debug common errors in your Painless scripts. Array/list manipulation errors, Date math errors, Field not found (mapping...
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-debugging
products:
  - Elasticsearch
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# Debug Painless scripts in Elasticsearch
Use the topics in this section to debug common errors in your [Painless](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/modules-scripting-painless) scripts.
- [Array/list manipulation errors](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-array-list-manipulation-errors)
- [Date math errors](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-date-math-errors)
- [Field not found (mapping conflicts)](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-field-not-found)
- [Ingest pipeline failures](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-ingest-pipeline-failures)
- [Null pointer exceptions](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-null-pointer-exceptions)
- [Regex pattern matching failures](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-regex-pattern-matching-failures)
- [Runtime field exceptions](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-runtime-field-exceptions)
- [Sandbox limitations](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-sandbox-limitations)
- [Script score calculation errors](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-script-score-calculation-errors)
- [Subfield access](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-subfield-access)
- [Type casting issues](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5602/explore-analyze/scripting/painless-type-casting-issues)


## Additional resources

- [A Brief Painless walkthrough](https://docs-v3-preview.elastic.dev/elastic/elasticsearch/tree/main/reference/scripting-languages/painless/brief-painless-walkthrough)