Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode iOS 14 WidgetKit not always attached to debugger

I'm developing WidgetKit extension on iOS 14, however, the extension doesn't always connect to Xcode debugger after build and run, causing I can't see logs, as this image shows: (But sometimes it'll automatically attach, I don't know why)

enter image description here

If the extension is attached to debugger, it should look like this, and print logs:

enter image description here

Manually attach process to debugger doesn't works, it should be attached at first launch to see logs.

Does anyone know how to properly debug iOS 14 widget?

like image 647
Johnny Avatar asked Nov 20 '20 01:11

Johnny


Video Answer


2 Answers

Try plugging in your physical device and running it on that instead of a simulator. That fixed the logging issue for me.

like image 81
Andy Avatar answered Nov 10 '22 07:11

Andy


To debug, or see print info: (This works for me)

On the top left of Xcode->
Click project name, you can see a list, select widget name, run it
Click widget name, you can see a list, select project name, run it
Xcode: Version 12.3, iPad: iPadOS 14.3

like image 28
orli Avatar answered Nov 10 '22 09:11

orli