diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 343074f61c..7d5a608a68 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -959,6 +959,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning())); setProperty(hifi::properties::CRASHED, _previousSessionCrashed); +#if 0 { const QString TEST_SCRIPT = "--testScript"; const QString TRACE_FILE = "--traceFile"; @@ -976,6 +977,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo } } } +#endif // make sure the debug draw singleton is initialized on the main thread. DebugDraw::getInstance().removeMarker(""); diff --git a/interface/src/main.cpp b/interface/src/main.cpp index 8d98766bfc..677edb0bf3 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -42,9 +42,18 @@ extern "C" { int main(int argc, const char* argv[]) { setupHifiApplication(BuildInfo::INTERFACE_NAME); auto tracer = DependencyManager::set(); - tracer->startTracing(); + const char * traceFile = ""; + { + for (int a = 1; a < argc; ++a) { + if (strcmp(argv[a], "--traceFile") == 0 && argc > a + 1) { + traceFile = argv[a + 1]; + tracer->startTracing(); + break; + } + } + } PROFILE_SYNC_BEGIN(startup, "main startup", ""); - + #ifdef Q_OS_LINUX QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar); #endif @@ -283,7 +292,7 @@ int main(int argc, const char* argv[]) { server.close(); tracer->stopTracing(); - tracer->serialize(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) + "/Traces/trace-startup.json.gz"); + tracer->serialize(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/" + traceFile); } Application::shutdownPlugins();