I create a new nativescript application (ns create xxxx) and then run it to get it loaded into a simulator (ns run ios).
Once running, I add a console log anywhere (on init, or as an action from a button click etc.) and it will not output to the console.
I have found a thread on Stack that posed a similar question but it looks like they never got much feedback (and others reported the issue).
I have tried running in the VSCode terminal as well as the regular terminal (so it’s not a VSCode thing). I am completely floored on what could be causing this.
This looks strange because
console.logs usually work ok. Please check the following
Be sure that you do not run your application in release mode or with
--env.uglifyflag because it may cause drop logging
Disable hot module replacement option. Sometimes it cause issues.
Be sure to use correct
consoleoperations. For example
console.debugis not supported. You can find full list here
hooksfolders before next run. Just in case.
Don’t you have
consoleobject overridden by some other object?
Try to change your
alertand check if it works.
Please, come back after your check all the points from this checklist, also please add the report from your
ns doctor command, and let’s see if we can move on
Since you’re using MacBook based on M1 processor it seems that your question is related to this issue:
Unfortunately, the only advice I can give you for now is to follow the thread for some solution or workarounds