# How To Use the DrawDebugCanvas2DXXX function

**URL:** <https://forums.unrealengine.com/t/how-to-use-the-drawdebugcanvas2dxxx-function/460396>\
**Category:** Rendering\
**Tags:** canvas, debug-draw, unreal-engine, CPP, question\
**Created:** [January 10, 2020, 12:45pm UTC](https://forums.unrealengine.com/t/how-to-use-the-drawdebugcanvas2dxxx-function/460396 "2020-01-10T12:45:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2f169c1d1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2f169c1d1](https://forums.unrealengine.com/u/anonymous_user_2f169c1d1)\
**Post date:** [January 10, 2020, 12:45pm UTC](https://forums.unrealengine.com/t/how-to-use-the-drawdebugcanvas2dxxx-function/460396/1 "2020-01-10T12:45:31Z")

</div>

Currently I need to Draw some 2D debug Object, I find Some Functions `DrawDebugCanvas2DXXX(...)`  
But It needs `UCanvas` for Draw,So after some digging I found there’s a `UCanvas* DebugCanvas` in AHUD classes,  
But it’s private and I can’t find a way to access The `DebugCanvas` in The `AHUD`.

So I want to ask How to use `DrawDebugCanvas2DXXX(...)` in general.

Thanks in advance.
