Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/platforms/java/common/source-context/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ To use suspect commits and stack trace linking, you'll need to set up a code map

Use the following steps to determine the correct **Stack Trace Root** **Source Code Root** while setting up your code mapping:

First, navigate to a stack trace that you wish to map. Find an **In App** frame, which is denoted by a bubble on the right side of the frame. The Java module will be shown as the first piece of text at the left hand side of the frame header (marked as **1** in the below screenshot). In this example, it is `com.example.vu.android.MainActivity`. Hovering over the module will show the absolute path to the file (marked as **2** in the below screenshot). In this example, it is `MainActivity.java`.
First, navigate to a stack trace that you wish to map. Find an **In App** frame, which is denoted by a bubble on the right side of the frame. The Java module will be shown as the first piece of text on the left-hand side of the frame header. Hovering over the module will display the file's absolute path. In the screenshot below, the model is `com.example.vu.android.MainActivity` and the absolute file path is `MainActivity.java`.

![Highlighting where in the stack trace to find the module and absolute path](./img/java-code-mappings-stacktrace.png)
![A screenshot showing where in the stack trace you can find the Java module and absolute path](./img/java-code-mappings-stacktrace.png)

Next, calculate the derived file path. Take the frame `module` and replace all `.` characters with `/`. Then, replace the last item (`MainActivity` in this example) with the absolute path found earlier (`MainActivity.java`). In this example, the derived file path is `com/example/vu/android/MainActivity.java`.

Expand Down
Loading