Skip to content

Commit 6e9e09c

Browse files
authored
Add Debug::Tracer tracer stack variable to main so that TraceMessageBus works (#503) (#505)
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com> Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
1 parent 6634711 commit 6e9e09c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Gem/Code/Source/Automation/ScriptReporter.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ namespace AtomSampleViewer
146146
//! Records all the information about a single test script.
147147
struct ScriptReport : public AZ::Debug::TraceMessageBus::Handler
148148
{
149+
ScriptReport()
150+
{
151+
AZ::Debug::TraceMessageBus::Handler::BusConnect();
152+
}
153+
149154
~ScriptReport()
150155
{
151156
AZ::Debug::TraceMessageBus::Handler::BusDisconnect();

Standalone/Platform/Common/AtomSampleViewerApplication.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ namespace AtomSampleViewer
331331

332332
int RunGameCommon(int argc, char** argv, AZStd::function<void()> customRunCode)
333333
{
334+
const AZ::Debug::Trace tracer;
334335
AtomSampleViewer::AtomSampleViewerApplication app(&argc, &argv);
335336

336337
const AzGameFramework::GameApplication::StartupParameters gameAppParams;

0 commit comments

Comments
 (0)