Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Questions about Trace Server Protocol in VS Code

Hi Josh,

Thanks for asking!

I will preface this with the fact that I am not super knowledgeable about vscode.

-- Visualizing traces using Trace Compass --

With Trace Compass we support GDB tracing. (https://archive.eclipse.org/tracecompass/doc/stable/org.eclipse.tracecompass.gdbtrace.doc.user/User-Guide.html) I think this may be useful for your work, check out http://tracecompass.org and the code here (https://git.eclipse.org/c/tracecompass/org.eclipse.tracecompass.git/tree/gdbtrace). With this you should have a Eclipse Trace Compass based UI in SWT on the host. In that scenario all work is done on the host side. To be clear, using trace compass on the host is just a reference and sanity check, the trace will be only seen on the host side.

-- Using the trace server protocol --

The trace server protocol is a carrier layer that is designed to minimize UI work and have the heavy lifting done in the back-end. So GDB is not a trace analysis tool, there needs to be a bit of logic in between GDB and the TSP. Trace compass already has some work done there, see trace-server (https://git.eclipse.org/c/tracecompass.incubator/org.eclipse.tracecompass.incubator.git/tree/trace-server) It does not require any UI components.

> My understanding is that tsp-typescript-client can be configured to point to a Base URL (host:port), in my case JLink GDBServer?

You cannot connect as far as I know the trace server to a GDB Server. The TSP connects to a trace server. The server's responsibility is to send easily visualized data, so it converts the trace to more human readible data.

-- Showing the results --

In order to visualize the data afterwords, the front-end can be done in theia based on this : (https://github.com/theia-ide/theia-trace-extension) or (https://github.com/theia-ide/tsp-python-client) or something custom using vscode. There are a lot of options. At that point, for vscode, you can also take a peek at the theia trace extension which is implemented in typescript too and inspire yourself.

-- Answers to particular questions --

> However, I’m fairly new to developing in Visual Studio Code and so I’m unsure about how I can test or use the tsp-typescript-client?
There is an npm module for the typescript client, https://www.npmjs.com/package/tsp-typescript-client

> Do I build the project, create a launch file and debug it?
That's how I would go about it, you don't need to rebuild the typescript client by the way. To be clear, the client is the client of a protocol, how you use it is up to you.

> Also, how do I extend it to create my own implementation, if I need to make any changes?
I would suggest looking at the theia implementation for inspiration.

> Finally, I’ve been using https://theia-ide.github.io/trace-server-protocol/ as my only source of reference so far, are there any other resources that may be of use to me?
See above links

If you have feedback or want to contribute, please let us know. This sounds like a really interesting project, and a great use case. If there's anything blocking you, don't hesitate to contact us for more info.

By the way, Theia IDE (https://theia-ide.org/) has just hit 1.0. I suggest checking it out.

Cheers and stay safe,
Matthew Khouzam


From: tracecompass-dev-bounces@xxxxxxxxxxx <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Sent: Wednesday, April 1, 2020 5:18 AM
To: tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Subject: [tracecompass-dev] Questions about Trace Server Protocol in VS Code
 

Hi All,

 

I’m working on some debugging extensions in Visual Studio Code for Renesas Electronics, as part of a University project and want to include some Trace Analysis support. Using Segger GDB Server query packets I can request and retrieve Trace data. I’ve attached a system overview design of how I see the trace data being fetched and processed.

 

I’ve been looking at the Trace Server Protocol and tsp-typescript-client, but I’m unsure how to use these extensions. My understanding is the tsp-typescript-client project is a barebones implementation of a Trace Server, following the Trace Server Protocol. Initially I want to figure how to input the Trace data I receive within GDB into the trace server (tsp-typescript-client). My understanding is that tsp-typescript-client can be configured to point to a Base URL (host:port), in my case JLink GDBServer? However, I’m fairly new to developing in Visual Studio Code and so I’m unsure about how I can test or use the tsp-typescript-client? Do I build the project, create a launch file and debug it? Also, how do I extend it to create my own implementation, if I need to make any changes? Finally, I’ve been using https://theia-ide.github.io/trace-server-protocol/ as my only source of reference so far, are there any other resources that may be of use to me?

 

I would be very grateful for any advice you can give me.

 

Many Thanks,

Josh Parsons

 



Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf, Arcadiastrasse 10, 40472 Duesseldorf, Germany, Handelsregister/Commercial Register: Duesseldorf, HRB 3708 USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg. no.: DE 14978647


Back to the top