# Debugging Flower

**URL:** <https://discuss.flower.ai/t/debugging-flower/353>\
**Category:** Flower Help - Beginners\
**Tags:** flower\
**Created:** [October 17, 2024, 3:22pm UTC](https://discuss.flower.ai/t/debugging-flower/353 "2024-10-17T15:22:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukasbloemer](https://avatars.discourse-cdn.com/v4/letter/l/cc9497/32.png) [@lukasbloemer](https://discuss.flower.ai/u/lukasbloemer)\
**Post date:** [October 17, 2024, 3:22pm UTC](https://discuss.flower.ai/t/debugging-flower/353/1 "2024-10-17T15:22:48Z")

</div>

Hello everyone,  
I am new to Flower and I am wondering what the best way to debug a simulation is. I have tried using the PyCharm debugger but couldn’t get it to work with the “flwr run” command.  
I am thankful for any suggestions.  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![chongshenng](https://dub1.discourse-cdn.com/flex013/user_avatar/discuss.flower.ai/chongshenng/32/153_2.png) [@chongshenng](https://discuss.flower.ai/u/chongshenng)\
**Post date:** [October 23, 2024, 7:09am UTC](https://discuss.flower.ai/t/debugging-flower/353/2 "2024-10-23T07:09:46Z")

</div>

Hello @lukasbloemer and welcome!

I try to implement dummy code in certain sections to test whether it’s running correctly. For instance, I might replace the `fit` method in my `NumPyClient` like so:

```auto
def fit(self, parameters, config)
    return np.ones((1, 1)), 1, {}

```

to check that the `ClientApp` calls `fit()` correctly. Then, I’ll swap out other parts to narrow down the bug.

I’d also reduce the clients to 2 (if possible) and set 1 FL round to simplify the debugging process.

---

<div class="post-metadata">

**Author:** ![lukasbloemer](https://avatars.discourse-cdn.com/v4/letter/l/cc9497/32.png) [@lukasbloemer](https://discuss.flower.ai/u/lukasbloemer)\
**Post date:** [October 31, 2024, 10:45am UTC](https://discuss.flower.ai/t/debugging-flower/353/3 "2024-10-31T10:45:11Z")

</div>

Thanks! So there is no way for me to use a debugger and breakpoints?

---

<div class="post-metadata">

**Author:** ![rooijenalv-tno](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@rooijenalv-tno](https://discuss.flower.ai/u/rooijenalv-tno)\
**Post date:** [January 8, 2025, 3:56pm UTC](https://discuss.flower.ai/t/debugging-flower/353/4 "2025-01-08T15:56:56Z")

</div>

Would indeed be wonderful to debug an ClientApp or ServerApp using a (pycharm) debugging process to strep through it.
