Nativescript: Unable to get console.log messages

Created on 20 Sep 2017  路  9Comments  路  Source: NativeScript/NativeScript

Which platform(s) does your issue occur on?

iOS

Tell us about the problem

Unable to display "console.log()" messages in iOS applications after having upgrade to XCode 9. However, the messages are being displayed in Android.

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.2.1
  • Cross-platform modules: 3.2.0
  • Runtime(s): 3.2.0

Is there code involved?

I am creating the template app with "tns create hello --ng" and adding a constructor method to the app.component.ts file and including the command "console.log("Hello!")" but no console.log messages are being displayed in the Terminal screen.

Any assistance is appreciated. Thanks.

bug ios

Most helpful comment

@tsonevn Thanks for confirming the issue with iOS 11. As a workaround @triniwiz suggested I use "tns debug ios" and go to "Console" in Nativescript Inspector which displays the "console.log()" messages there.

Hopefully a fix is on the way for this bug so we can return to using "tns run ios". I am presently downloading an iOS 10 Simulator as well so I can ease my debugging effort until a fix is prepared.

All 9 comments

I can confirm the problem, same app stopped displaying console log after the update to XCode 9, I was on 3.2.0 and I tried to update to 3.2.1 but the problem persisted.

If the app is started from XCode everything is displayed correctly in the the XCode console.

Hi @shivapersad @stefalda,

I was able to reproduce this issue only on iOS 11 and the console.log seems to work as expected on older iOS versions. The problem is reproducible also on non-Angular project.
I am attaching sample project, which could be used for debugging.
Archive.zip

@tsonevn Thanks for confirming the issue with iOS 11. As a workaround @triniwiz suggested I use "tns debug ios" and go to "Console" in Nativescript Inspector which displays the "console.log()" messages there.

Hopefully a fix is on the way for this bug so we can return to using "tns run ios". I am presently downloading an iOS 10 Simulator as well so I can ease my debugging effort until a fix is prepared.

@sebawita and I have confirmed this as a bug, looking for a patch possibly? thanks

@shivapersad can confirm switching to ios 10.3 simulator worked for me.

hi, team, this is a pain in everyone's rear, can we get a fix date on this please? Or a patch?

Just a FYI: there is a workaround; see my blog http://fluentreports.com/blog/?p=545

This issue was moved to NativeScript/ios-runtime#800

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fmmsilva picture fmmsilva  路  3Comments

Leo-lay picture Leo-lay  路  3Comments

guillaume-roy picture guillaume-roy  路  3Comments

Pourya8366 picture Pourya8366  路  3Comments

vtisnado picture vtisnado  路  3Comments