# how to debug code in arduino IDE

**URL:** <https://forum.arduino.cc/t/how-to-debug-code-in-arduino-ide/209670>\
**Category:** Programming\
**Created:** [February 4, 2014, 2:45pm UTC](https://forum.arduino.cc/t/how-to-debug-code-in-arduino-ide/209670 "2014-02-04T14:45:10Z")\
**Posts on this page:** 1\
**Showing post:** 30

<div class="post-metadata">

**Author:** ![Watcher](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/watcher/32/216151_2.png) [@Watcher](https://forum.arduino.cc/u/Watcher)\
**Post date:** [February 4, 2019, 3:16pm UTC](https://forum.arduino.cc/t/how-to-debug-code-in-arduino-ide/209670/30 "2019-02-04T15:16:34Z")

</div>

```cpp
#define DEBUG_PRINT(...)   Serial.print(F(# __VA_ARGS__" = ")); Serial.print ( __VA_ARGS__ );Serial.print(F(" ")) 
#define DEBUG_PRINTLN(...) DEBUG_PRINT( __VA_ARGS__ ); Serial.println()

```

Could someone please explain how this **VA\_ARGS** thing works?

Also this thread is very very useful for all users and therefore should /could it be made sticky?

---

_[View the full topic](https://forum.arduino.cc/t/how-to-debug-code-in-arduino-ide/209670)._
