# Debugging Python Code

**URL:** <https://forum.dynamobim.com/t/debugging-python-code/12729>\
**Category:** Developers\
**Tags:** python\
**Created:** [June 26, 2017, 6:06am UTC](https://forum.dynamobim.com/t/debugging-python-code/12729 "2017-06-26T06:06:15Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![Gui\_Talarico](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gui_talarico/32/10887_2.png) [@Gui\_Talarico](https://forum.dynamobim.com/u/Gui_Talarico)\
**Post date:** [July 21, 2017, 5:37pm UTC](https://forum.dynamobim.com/t/debugging-python-code/12729/14 "2017-07-21T17:37:40Z")

</div>

Hi @Racel_Williams. Sorry I missed your second msg. I don’t really know C# well enough to be able to contribute to Core at this time, but anyone is more than welcome to borrow from this and create better implementations.

* * *

A few people asked me for clarification on how to use the Console, so I am adding more details below:

## How to use RPW’s Console to debug python code:

### 1. Install RevitPythonWrapper (rpw) through the package manager

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/8/a82ff8dbace432a2809ed0998772c4f34022ce6a.png)

##### Note: Note that rpw package ships with a `GettingStarted.dyn` you can use to familiarize yourself with how it’s used withing Dynamo.

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/5/a5ecf95a1b9c59b90bf110f394859327d73eb673.png)

### 2. Build the graph below using RPW\_GetFilePath and python node.

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/2/c293e69df858f6096f8c6659794c24c504b5cd37.png)

```
import sys
sys.path.append(IN[0]) # Assumes RPW_GetFilePath output is IN[0]

from rpw.ui.forms import Console

for i in range(10):
	if i ==5:
		Console(context=locals())

```

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/5/b58a588d8b622bf62e1272d9694f074848aa416d.png)

---

_[View the full topic](https://forum.dynamobim.com/t/debugging-python-code/12729)._
