# Is it possible to force RenderDoc show only relevant code?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-force-renderdoc-show-only-relevant-code/635359>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** GPU-Profiling, unreal-engine, UE5-0\
**Created:** [August 27, 2022, 2:53pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-force-renderdoc-show-only-relevant-code/635359 "2022-08-27T14:53:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Def0rp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Def0rp](https://forums.unrealengine.com/u/Def0rp)\
**Post date:** [August 27, 2022, 2:53pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-force-renderdoc-show-only-relevant-code/635359/1 "2022-08-27T14:53:42Z")

</div>

Using RenderDoc in other engines, for the particular drawcall i always got pretty compact and easy to read shader code. Not 100% sure but i think all of that code was actually used in that drawcall.  
In Unreal i always get ~16k lines of code, and i assume that it just shows lots of actually unused code. So to see whats happening i have to debug step-by-step which is times slower. Any idea if there are ways to force RenderDoc show more relevant and compact code for a drawcall? Obviously ~16k lines of code are not executed on each drawcall.

---

<div class="post-metadata">

**Author:** ![Def0rp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Def0rp](https://forums.unrealengine.com/u/Def0rp)\
**Post date:** [February 18, 2023, 5:41pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-force-renderdoc-show-only-relevant-code/635359/2 "2023-02-18T17:41:13Z")

</div>

If you’re as blind as I was when I created this post - you can press “View” instead , that would indeed show you only the relevant part, so you could track stuff easier there and switch to Edit if you really need to. There is also a debug functionality in RenderDoc to step-by-step your shader.
