You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+16-1
Original file line number
Diff line number
Diff line change
@@ -196,11 +196,13 @@ Since Xcode properly supports wrapping Swift libraries, we can just submit it fr
196
196
197
197
This is only an issue if you must support iOS < 12.2.
198
198
199
-
## Generating a Stack Trace (Device only)
199
+
## Generating a Stack Trace
200
200
201
201
If you experience a crash on your end it's very valuable for us to have as much information as possible to provide you with the best support experience.
202
202
Such valuable information includes a stack trace of the crash. Here's a quick step-by-step guide, showing how to generate a stack trace in Visual Studio 2019:
203
203
204
+
- Device (Recommended)
205
+
204
206
1. In the Terminal app enter the following command: `touch ~/.mtouch-launch-with-lldb`. This will essentially let you use lldb to debug your application when it launches.
205
207
2. Launch your app in debug mode in Visual Studio for Mac.
206
208
3. Open the Application Output window in Visual Studio. It will ask you to execute another command in the Terminal.
@@ -209,6 +211,19 @@ Such valuable information includes a stack trace of the crash. Here's a quick st
209
211
210
212
If you want to remove lldb from your debug setup again you can simply run `rm ~/.mtouch-launch-with-lldb` in your Terminal.
211
213
214
+
215
+
- Simulator
216
+
217
+
1. Launch your app in debug mode in Visual Studio for Mac.
218
+
2. Open your Activity Monitor app.
219
+
3. In the Activity Monitor app search for your app name in the search bar. To give an example, if I want to attach to our PSPDFCatalog example app I need to search for "PSPDFCatalog".
220
+
4. Double-Click on the process to view the information window.
221
+
5. Now you need to identify the PID (Process ID) of your process. The PID is the number included in the round brackets in the window title, e.g. if the title says "PSPDFCatalog (73389)", then 73389 is your PID.
222
+
6. Now you need to open your Terminal app and enter the following command to attach lldb: `lldb -p YOUR-PID aux`. For the example case above this is what the full command would look like: `lldb -p 73389 aux`.
223
+
<imgwidth="50%"src="Images/pid.png"/>
224
+
7. Once lldb is set up in the terminal window, you can simply use it like you would in Xcode.
225
+
8. To get a stack trace you need to type `bt all`.
226
+
212
227
# Contributing
213
228
214
229
Please ensure [you signed our CLA](https://pspdfkit.com/guides/web/current/miscellaneous/contributing/) so we can accept your contributions.
0 commit comments