# Attach debugger to pvpython

**URL:** https://discourse.paraview.org/t/attach-debugger-to-pvpython/3948
**Category:** ParaView Support
**Created:** [April 2, 2020, 2:03pm UTC](https://discourse.paraview.org/t/attach-debugger-to-pvpython/3948 "2020-04-02T14:03:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![CapLek](https://discourse.paraview.org/user_avatar/discourse.paraview.org/caplek/32/3430_2.png) [@CapLek](https://discourse.paraview.org/u/CapLek)
#### Post date: [April 2, 2020, 2:03pm UTC](https://discourse.paraview.org/t/attach-debugger-to-pvpython/3948/1 "2020-04-02T14:03:50Z")

</div>

I need to debug some python scripts run under pvpython process but have no luck in attaching the debugger. Tried to attach through PyCharm and Microsoft VS Code IDEs. Could anyone share some experience on how to debug python scripts launched from pvpython? What is the correct procedure and what are necessary settings to successfully attach the debugger?

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [April 2, 2020, 2:09pm UTC](https://discourse.paraview.org/t/attach-debugger-to-pvpython/3948/2 "2020-04-02T14:09:05Z")

</div>

You can add a breakpoint in your script with  
import pdb; pdb.set\_trace()

The python debugger will stop at that point and you continue to use all debugger features from that point on.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 1, 2020, 2:08pm UTC](https://discourse.paraview.org/t/attach-debugger-to-pvpython/3948/3 "2020-10-01T14:08:03Z")

</div>

Added as a Tips & Tricks : [How to debug a pvpython script](https://discourse.paraview.org/t/how-to-debug-a-pvpython-script/5468)
