Skip to content

Commit a48c159

Browse files
Update instructions to set up trace server
The current instructions to set up the trace server for the trace extension does not explicitly indicate steps that only apply to Linux users. In addition, the lack of clear instructions for manually downloading and setting up the trace server makes it difficult for developers, who uses other OS, to run the trace server. This commit improves the documentation by providing clear instructions for developers on how to set up the server either by (1) using yarn, (2) downloading the server manually, or (3) building server manually. This will help contributors speed up their installation process, and reduce support effort. Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
1 parent a11489f commit a48c159

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

README.md

+36-4
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,45 @@ You can find those example applications under `examples/`.
9696

9797
### Run the Trace Server
9898

99-
In order to open traces, you need a trace server running on the same machine as the trace extension. You can download the [Eclipse Trace Compass server][tc-server] or let `yarn` download and run it:
99+
In order to open traces, you need a trace server running on the same machine as the trace extension. There are 3 options to run the trace server. You can build and start the server manually using the server development environment, from the command line, or from the Theia application. The latter two options requires you to download a Trace Server build. See [Getting a Trace Server build][tc-server-download-guide] for more details.
100+
101+
#### Building with the server development environment
102+
103+
You can build and run the trace server manually using Eclipse. Starting it manually, has the advantage, that the open-traces
104+
are populated with traces on the server, or the server can be started in debug mode from the server development environment to debug the server. To set up the development environment for the Trace Server, see [here][tc-server-build].
105+
106+
Please note that you need to stop the server manually as well.
107+
108+
#### Starting the Trace Server from the command line
109+
110+
To start the Trace Server from the command line, use the following command:
100111

101112
```bash
102-
yarn download:server
103113
yarn start:server
104114
```
105115

106-
You can also build the trace-server yourself using Trace Compass and the Incubator. Take a look at the [instructions here][tc-server-build].
116+
Please note that you need a Trace Server Build before starting the server. See [Getting a Trace Server build][tc-server-download-guide] for more details. You will need to stop the server manually as well.
117+
118+
#### Starting the Trace Server from the Theia application
119+
120+
When you open a trace using the Theia application, the trace server will be automatically started. Alternately, you can start
121+
the server from the application. First, open the command pallette (using `Ctrl+Shift+P` or `F1`), then use the command `Start Trace Server`. You can also use the `Stop Trace Server` command to stop the server. Otherwise, the server will be stopped
122+
automatically when you stop the application. By default, it uses the location where `yarn download:server` stores the server for both the browser backend and electron app.
123+
124+
Please note that you need a Trace Server Build before starting the server. See [Getting a Trace Server build][tc-server-download-guide] for more details.
125+
126+
#### Getting a Trace Server build
127+
128+
You can download different builds of the Trace Server [here][tc-server]. Select the version of the Trace Server that best matches your working environment. There are different versions of the trace server for Linux, Windows and MacOS.
129+
130+
If you are working on Linux, you can simply let `yarn` download it:
131+
132+
```bash
133+
yarn download:server
134+
```
135+
136+
If you are on other OS, you can download the server manually and extract the compressed files. Make sure that the path stored
137+
in `yarn start:server` matches with the location where you have extracted the server build. You can also change the path of the `yarn start:server` command to switch between different server builds.
107138

108139
### Run the example app
109140

@@ -385,6 +416,7 @@ pip install -r requirements.txt
385416
[tc-project]: https://www.eclipse.org/tracecompass/
386417
[tc-server]: https://download.eclipse.org/tracecompass.incubator/trace-server/rcp/?d
387418
[tc-server-build]: https://www.eclipse.org/tracecompass/download.html#trace-server
419+
[tc-server-download-guide]: #getting-a-trace-server-build
388420
[tc-server-gh-label]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/labels/Trace%20Server
389421
[tci-code]: https://git.eclipse.org/r/admin/repos/tracecompass.incubator/org.eclipse.tracecompass.incubator
390422
[theia-prereq]: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites
@@ -402,4 +434,4 @@ pip install -r requirements.txt
402434
[tsp]: https://github.com/eclipse-cdt-cloud/trace-server-protocol
403435
[tspc]: https://github.com/eclipse-cdt-cloud/tsp-typescript-client
404436
[tsp-gh-label]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/labels/trace%20server%20protocol
405-
[yarn-issue-2821]: https://github.com/yarnpkg/yarn/issues/2821
437+
[yarn-issue-2821]: https://github.com/yarnpkg/yarn/issues/2821

0 commit comments

Comments
 (0)