# FFrame C++ Get StackTrace

**URL:** <https://forums.unrealengine.com/t/fframe-c-get-stacktrace/766343>\
**Category:** C++\
**Tags:** unreal-engine, question, CPP\
**Created:** [February 8, 2023, 10:52am UTC](https://forums.unrealengine.com/t/fframe-c-get-stacktrace/766343 "2023-02-08T10:52:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hummer4x41](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hummer4x41](https://forums.unrealengine.com/u/Hummer4x41)\
**Post date:** [February 8, 2023, 10:52am UTC](https://forums.unrealengine.com/t/fframe-c-get-stacktrace/766343/1 "2023-02-08T10:52:34Z")

</div>

How do I get StackTrace() to the place where the method was called. I can’t find anything about how to achieve this. All the examples I found on the Internet are not working.

The task is to get the history of the branch from where N method was called.

An example of what I want to achieve:  
class FMyCustomClass  
{  
public:  
void MyMethod()  
{  
Call StackTrace()  
// This is where I want to get information about where the method was created from  
}

}

---

<div class="post-metadata">

**Author:** ![PresumptivePanda](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/presumptivepanda/32/1194593_2.png) [@PresumptivePanda](https://forums.unrealengine.com/u/PresumptivePanda)\
**Post date:** [February 9, 2023, 12:32am UTC](https://forums.unrealengine.com/t/fframe-c-get-stacktrace/766343/2 "2023-02-09T00:32:39Z")

</div>

Hi there @Hummer4x41. Hope you’re well!

This topic has been moved from **International** to **Programming & Scripting: C++**.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Hopefully, this category change will help in finding an answer. In the meantime, good luck and happy developing! 🙂

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [February 9, 2023, 5:07am UTC](https://forums.unrealengine.com/t/fframe-c-get-stacktrace/766343/3 "2023-02-09T05:07:41Z")

</div>

Hey there @Hummer4x41! This is actually a great question that I’m not sure of myself. Looking into this thread there are a couple of leads mostly pertaining to dumping the stack to the log:

> [@How to print callstack into log?](https://forums.unrealengine.com/t/how-to-print-callstack-into-log/363084/):
>
> Hey guys, How can i print call stack into log ? In blueprint there is Stack Trace node but I can not call that directly in c++ because of linker errors. What is the best way to print callstack in code ?

---

<div class="post-metadata">

**Author:** ![Hummer4x41](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hummer4x41](https://forums.unrealengine.com/u/Hummer4x41)\
**Post date:** [February 14, 2023, 7:48pm UTC](https://forums.unrealengine.com/t/fframe-c-get-stacktrace/766343/4 "2023-02-14T19:48:04Z")

</div>

Yes, I saw this topic on the forum, but there is no answer. Even stack to log, doesn’t output necessary information or returns empty stack at all. But first of all I need to get stack in explicit form so that I could form it and work with it as a separate data.
