doc: add a section  about debugging in docker-compose with PyCharm
diff --git a/docs/apache-airflow/howto/docker-compose/index.rst b/docs/apache-airflow/howto/docker-compose/index.rst
index 2cd92fa04824d..aaff211d2f13b 100644
--- a/docs/apache-airflow/howto/docker-compose/index.rst
+++ b/docs/apache-airflow/howto/docker-compose/index.rst
@@ -358,6 +358,49 @@ Networking
 
 In general, if you want to use Airflow locally, your DAGs may try to connect to servers which are running on the host. In order to achieve that, an extra configuration must be added in ``docker-compose.yaml``. For example, on Linux the configuration must be in the section ``services: airflow-worker`` adding ``extra_hosts: - "host.docker.internal:host-gateway"``; and use ``host.docker.internal`` instead of ``localhost``. This configuration vary in different platforms. Please check the Docker documentation for `Windows <https://docs.docker.com/desktop/windows/networking/#use-cases-and-workarounds>`_ and `Mac <https://docs.docker.com/desktop/mac/networking/#use-cases-and-workarounds>`_ for further information.
 
+Debug Airflow inside docker container using PyCharm
+===================================================
+.. jinja:: quick_start_ctx
+
+    Prerequisites: Create a project in **PyCharm** and download the (`docker-compose.yaml <{{ doc_root_url }}docker-compose.yaml>`__).
+
+Steps:
+
+1) Modify  ``docker-compose.yaml``
+
+   Add the following section under the ``services`` section:
+
+.. code-block:: yaml
+
+    airflow-python:
+    <<: *airflow-common
+    profiles:
+        - debug
+    environment:
+        <<: *airflow-common-env
+    user: "50000:0"
+    entrypoint: ["bash"]
+
+.. note::
+
+    This code snippet creates a new service named **"airflow-python"** specifically for PyCharm's Python interpreter.
+    On a Linux system,  if you have executed the command ``echo -e "AIRFLOW_UID=$(id -u)" > .env``, you need to set ``user: "50000:0"`` in ``airflow-python`` service to avoid PyCharm's ``Unresolved reference 'airflow'`` error.
+
+2) Configure PyCharm Interpreter
+
+   * Open PyCharm and navigate to **Settings** (or **Preferences** on macOS) > **Project: <Your Project Name>** > **Python Interpreter**.
+   * Click the **"Add Interpreter"** button and choose **"On Docker Compose"**.
+   * In the **Configuration file** field, select your ``docker-compose.yaml`` file.
+   * In the **Service field**, choose the newly added ``airflow-python`` service.
+   * Click **"Next"** and follow the prompts to complete the configuration.
+
+.. image:: /img/add_container_python_interpreter.png
+    :alt: Configuring the container's Python interpreter in PyCharm, step diagram
+
+Building the interpreter index might take some time.
+Once configured, you can debug your Airflow code within the container environment, mimicking your local setup.
+
+
 FAQ: Frequently asked questions
 ===============================
 
diff --git a/docs/apache-airflow/img/add_container_python_interpreter.png b/docs/apache-airflow/img/add_container_python_interpreter.png
new file mode 100644
index 0000000000000..c0bd2d7701ab0
Binary files /dev/null and b/docs/apache-airflow/img/add_container_python_interpreter.png differ

<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->

<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.

Feel free to ping committers for the review!

In case of an existing issue, reference it using one of the following:

closes: #ISSUE
related: #ISSUE

How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
Proposed Documentation Pull Request for Airflow

Background:
In a discussion with @potiuk about [Seeking Help: Missing Essential Python Packages during PyCharm Debugging on Docker Compose Interpreter](https://github.com/apache/airflow/discussions/37864). I proposed adding configuration instructions for this functionality to the Airflow documentation.

Changes:
This pull request adds a new section to the documentation that covers:
**Debug Airflow inside docker container using Pycharm**

I would appreciate it if you could review this pull request and provide any feedback.

<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
