> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/python-development-quick-start-guide/cortex-xsoar-python-development-quick-start-guide/development-tools-and-resources.md).

# Development Tools and Resources

Cortex XSOAR provides the following tools and resources to develop Python scripts.

### Demisto Class

The Demisto class is a standard Python class available to all automations and integrations and provides a large number of functions, a few of which are not available in integrations.

Some typical functions are:

**`demisto.args()`**

**`demisto.incident()`**

**`demisto.context()`**

**`demisto.indicator()`**

**`demisto.executeCommand()`**

### Common Server Python

The Common Server Python functions are automatically available to any automation. Common Server Python functions sit above the Demisto Class and provide simpler APIs.

Some typical functions are:

**`CommandResults()`**

**`return_results()`**

**`return_warning()`**

**`return_error()`**

### Common Server User Python

Like Common Server Python, Common Server User Python is available to every automation. By default, it is blank. Users add common code to share with automations they create. You can override the functions in Common Server Python by creating ones with the same name in Common Server User Python. Functions created in Common Server User Python do not appear in the script helper in the Cortex XSOAR console IDE.

### Common Scripts Content Pack

The Common Script content pack contains over 250 common scripts that are used for automated tasks in playbooks.

### Demisto Python Client

The Demisto Python client is a Python library for the Demisto API for creating remote applications not executed by Cortex XSOAR. A Demisto client class is instantiated providing methods that access Cortex XSOAR REST API endpoints.

### Cortex XSOAR Console IDE and Script Helper

The integrated IDE within the Cortex XSOAR console supports authoring scripts and integrations. It enables inserting code snippets into a script and provides basic how to descriptions of many of the functions.

### Generic Webhook Integration

The Generic Webhook integration creates incidents by posting HTTPS requests to the webhook endpoint. Download the Generic Webhooks content pack from the Marketplace. Configure an integration instance to listen for requests to the Cortex XSOAR server.

**`https://<xsoar server>/instance/execute/webhook`**

Or if a non-standard HTTPS port, for example 8000, is configured in the integration instance:

**`https://<xsoar server>:8000`**

### REST API

Scripts and the Cortex XSOAR console access the Cortex XSOAR server via its REST API. For the current list of API endpoints on your server, see the https\://\<xsoar server>/api URL or the [API Reference Guide](https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR-API). This list changes with Cortex XSOAR builds and releases.

### Demisto SDK

The Demisto SDK is a Python library that validates Cortex XSOAR entities being developed and assists interaction between your development environment and Cortex XSOAR. Commands are available to package content for inclusion in the Cortex XSOAR server and to release content to Marketplace.

### Cortex XSOAR Extension for Visual Studio Code

Visual Studio Code and the Cortex XSOAR extension are used for creating and publishing custom content packs for the Marketplace. It is installed along with the Demisto SDK, and a local clone of the GitHub **demisto** content repository is created. Docker is used for executing Python code linting tools against Python code. Creating mock functions of the Demisto class enables local debugging in Visual Studio Code. For authoring automations and simple integrations as part of Cortex XSOAR playbooks, using the XSOAR IDE in the Cortex XSOAR console with the Script Helper is a simpler approach.

### Troubleshooting

Cortex XSOAR provides development debugging and diagnostics tools. For additional information, see the [Troubleshooting Guide](https://xsoar.pan.dev/docs/reference/articles/troubleshooting-guide).

### Cortex XSOAR Playbook Debugging

When developing a playbook, you can use the playbook debugger for testing.

Commands entered on the Cortex XSOAR command line can have the debug-mode=true argument added:

**`<XSOAR command> <command arguments> debug-mode=true`**

In the incident’s War Room or the Cortex XSOAR playground entry, there is a **Download** link with detailed logging from the command.

For details on the debugger, see [Debug a Playbook](/xsoar-6-administrator-guide/6.14/customize-cortex-xsoar/customize-and-configure-cortex-xsoar/playbooks/playbook-testing/debug-a-playbook.md).

### Cortex XSOAR Automation Diagnostics

Diagnostic outputs from Cortex XSOAR scripts can be sent to an incident’s War Room or during testing in the playground using Demisto Class or Common Server Python functions:

**`CommandResults()`**

**`return_results()`**

**`return_warning()`**

**`return_error()`**

**`LOG()`**

**`LOG.print_log()`**

### Cortex XSOAR Server Logs

In the Cortex XSOAR console **Settings** → **About** → **Troubleshooting**, set Log Level to **Debug**. On the Cortex XSOAR server, the server and other logs are found at **`/var/log/demisto/server.log`**.

### Cortex XSOAR Integration Instance Logs

In the Cortex XSOAR console **Settings** → **Integrations** → **Instances**, you can enable integration instance debug logging by setting **Log Level: Debug**. The integration log file is found at **`/var/log/demisto/integration.log`**.

### Cortex XSOAR Log Bundle

In the Cortex XSOAR console **Settings** → **About** → **Troubleshooting**, select the **Download Logs** link to download the Cortex XSOAR log bundle for review.


---

# 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://cortex-docs.paloaltonetworks.com/python-development-quick-start-guide/cortex-xsoar-python-development-quick-start-guide/development-tools-and-resources.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.
