Cordova app suddenly has no console log in Xcode

2019-09-11 00:29发布

问题:

My Cordova app has been output console.log just fine in Console of Xcode. Then suddenly one day (not sure what happened), it just shows blank. I followed the instructions here but nothing works Xcode 4 - Debug Area no longer shows my console output (NSLog)

Here are what I have:

This always shows but BLANK:

UPDATE 1

I tried an old codebase and no console log either. So this looks like Xcode configuration specific. Something messed up randomly and automatically.

回答1:

I found out the deployment to device AND start may take up to a minute. If you open the app manually right after it deployed, it is a different instance and no debug available in Xcode. You have to wait for Xcode to run the app itself to show console info.