# Is there a way to progrsmatically start/stop application tracing?

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-progrsmatically-start-stop-application-tracing/1250852>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [August 4, 2023, 4:44pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-progrsmatically-start-stop-application-tracing/1250852 "2023-08-04T16:44:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KimberlyFNP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KimberlyFNP](https://forums.unrealengine.com/u/KimberlyFNP)\
**Post date:** [August 4, 2023, 4:44pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-progrsmatically-start-stop-application-tracing/1250852/1 "2023-08-04T16:44:37Z")

</div>

i want to be able to arbitrarily initiate a trace, particularly on a quest headset. other than launching the exe with command line switches, is there a way to trigger this from code?  
something like:  
//FString TraceFileName = FPaths::ProjectLogDir() + TEXT(Arc\_) + appMode + TEXT(\_) + DateTimeString + TEXT(.utrace);|  
//FOutputDeviceFile TraceFile(\*TraceFileName);  
//FPlatformMisc::BeginFileTrace(TraceFile);|

i cant access platformmisc from my game code it seems so maybe there is some other way, or i need to change my project config?

thank you
