Debugging a distributed application is still challenging in the notebook environment. Even though the web UI has the necessary information, there is a gap between web UIs and the development environment: it’s usually difficult to locate information in the web UI that is relevant to the code you are investigating; and there is no easy way to find historical runtime information.

Understanding how to debug with the Databricks Spark UI:
The Spark UI contains a wealth of information you can use for debugging your Spark jobs. There are a bunch of great visualizations, and we have a blog post here about those features.

For more details, click on Jobx View (Stages):

Reference: Tips to Debug Apache Spark UI with Databricks
Hope this helps.
Answer from CHEEKATLAPRADEEP on Stack OverflowHow to interactively debug a Python wheel in a Databricks Asset Bundle?
python - databricks - how to debug parameters when calling function - Stack Overflow
apache spark - Using databricks-connect debugging a notebook that runs another notebook - Stack Overflow
PySpark style guide
Videos
Hey everyone,
I’m using a Databricks Asset Bundle deployed via a Python wheel.
Edit: the library is in my repo and mine, but quite complex with lots of classes so I cannot just copy all code in a single script but need to import.
I’d like to debug it interactively in VS Code with real Databricks data instead of just local simulation.
Currently, I can run scripts from VS Code that deploy to Databricks using the vscode extension, but I can’t set breakpoints in the functions from the wheel.
Has anyone successfully managed to debug a Python wheel interactively with Databricks data in VS Code? Any tips would be greatly appreciated!
Edit: It seems my mistake was not installing my library in the environment I run locally with databricks-connect. So far I am progressing, but still running in issues when loading files in my repo which is usually in workspace/shared. Guess I need to use importlib to get this working seamlessly. Also I am using some spark attributes that are not available in the connect session, which require some rework. So to early to tell if in the end I am succesful, but thanks for the input so far.
Thanks!