Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Xiao-fei_Song
Product and Topic Expert
Product and Topic Expert
0 Kudos
430

In the previous blog post we know how to analyze the mobile services network trace har file using SAP Mobile Services Mobile Backend Tools, actually you can record the network trace using mobile backend tools directly. In this blog post, we will demonstrate how to record the network trace for mobile services using mobile backend tools.

First, login to your mobile services cockpit and ensure that feature "Mobile Network Trace" has been assigned to you mobile app:

2024-06-13_16-45-21.png

Click the "Mobile Network Trace" feature, you will see the network trace histories inside the network trace view:

2024-06-13_16-47-47.png

As you can see, there are already 2 network trace records for this mobile app. Let's take a look how to view the network trace records in mobile backend tools. 

First install SAP Mobile Services Mobile Backend Tools from VSCODE marketplace, and the follow the instructions to add the mobile service landscape to mobile backend tool from this blog post. Under the mobile app, open the "Network Traces" node:

2024-06-13_16-50-30.png

Locate the network trace record you want to view and click "Download Network Trace" icon:

2024-06-13_16-55-06.png

after the network trace record is downloaded, you should be able to view the content from the network trace analyzer:

2024-06-13_16-56-50.png

And you can start recording the network trace from mobile backend tools directly without going to the mobile services cockpit. In order to do that, click the "Start Record Network Trace" icon in the Network Trace node:

2024-06-13_17-11-20.png

You will see below the network trace recording UI:

2024-06-13_17-13-10.png

If you want to include the payload in the network trace record, select "Header and Body" in the log message options and click "Start Recording" button:

2024-06-13_17-15-03.png

Run you mobile app and perform the necessary requests to the server, and then click "Stop Recording" button on the UI:

2024-06-13_17-17-58.png

Now you should be able to see the newly generated network trace record. Download the record and you should be able to view its content:

2024-06-13_17-19-44.png

As a summary, in this blog post we demonstrated how to record the mobile services network trace using SAP Mobile Services Mobile Backend Tools. In addition to using the mobile services cockpit, you can record and view the network trace inside the Visual Studio Code environment without having to use third party tools.