swift trace “unexpectedly found nil” to the source

前端 未结 2 330
野的像风
野的像风 2021-01-07 08:10

Is there a way to find out which object is Nil? I get these errors from time to time while coding and normally I have no trouble finding them because I test my code frequent

2条回答
  •  迷失自我
    2021-01-07 09:01

    When you run into this error you should be able to browse through current assigned values in the box in the picture below. look at the box on the bottom left, you can look at any currently assigned value at the time of error. in this case the error is from attempting to read from a file that does not exist

    Here is a better example enter image description here

提交回复
热议问题