Since using NSLog was mentioned here for debugging, I thought I’d give that a try.
This is the code I am using to attempt to write something to the log file:
Dim x = "MsgLogged here"
NSLog("%@", $"{x}")
This code is right before a line of code that I know is working. Here are the steps I am following:
- Build the project.
- Deploy w/o running (to the simulator, which is already running).
- Manually launch the app in the simulator and wait for it to load and trigger the line of code that is working.
- From the Simulator menus, choose Debug => Open System Log
- In the log file, search for the text that should be logged, but it isn’t there.
The log file is not empty. I’m still too much of a newbie to know if what is in there is normal or not. And it does seem to get new information, just not my logged message.
So the question is: am I doing this correctly, or is there something obvious I should change to write information to the log file? (My Google-fu is failing me.)
Thanks,
–Avonelle