1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#include <private/qmllsmain_p.h>
5#include <QtCore/qcoreapplication.h>
6
7// To debug:
8//
9// * simple logging can be redirected to a file
10// passing -l <file> to the qmlls command
11//
12// * more complex debugging can use named pipes:
13//
14// mkfifo qmllsIn
15// mkfifo qmllsOut
16//
17// this together with a qmllsEcho script that can be defined as
18//
19// #!/bin/sh
20// cat -u < ~/qmllsOut &
21// cat -u > ~/qmllsIn
22//
23// allows to use qmllsEcho as lsp server, and still easily start
24// it in a terminal
25//
26// qmlls < ~/qmllsIn > ~/qmllsOut
27//
28// * statup can be slowed down to have the time to attach via the
29// -w <nSeconds> flag.
30
31using namespace Qt::StringLiterals;
32
33int main(int argv, char *argc[])
34{
35 QCoreApplication::setApplicationVersion(QLatin1String(QT_VERSION_STR));
36 QCoreApplication::setApplicationName("qmlls"_L1);
37 return QmlLsp::qmllsMain(argv, argc);
38}
39

source code of qtdeclarative/tools/qmlls/qmllanguageservertool.cpp