# Debug() visibility depending on following debug(e.g. $this)

**URL:** <https://discourse.cakephp.org/t/debug-visibility-depending-on-following-debug-e-g-this/7821>\
**Category:** Need Help\
**Tags:** behavior\
**Created:** [May 15, 2020, 11:22am UTC](https://discourse.cakephp.org/t/debug-visibility-depending-on-following-debug-e-g-this/7821 "2020-05-15T11:22:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HypJ3U50N](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/hypj3u50n/32/1803_2.png) [@HypJ3U50N](https://discourse.cakephp.org/u/HypJ3U50N)\
**Post date:** [May 15, 2020, 11:22am UTC](https://discourse.cakephp.org/t/debug-visibility-depending-on-following-debug-e-g-this/7821/1 "2020-05-15T11:22:31Z")

</div>

The output of `debug($this->request->getData());` and  
`$product_fields = array_intersect_key($this->request->getData(), array_flip($needle)); debug( $product_fields);`

is invisible until I add debug($this) AFTER the above. I used debug($this) to have something there I knew for sure it was present. If I put debug($this) in between, only the debugging ouput above debug($this) is shown. Is this normal behavior, and why if so?
