NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.04k stars 196 forks source link

console.log on device not working consistently if at all #4570

Closed dottodot closed 5 years ago

dottodot commented 5 years ago

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

Describe the bug

Firstly when using the ios simulator I have no problems whatsoever can work all day and console.log will work all the time. The problem only occurs when running on a device which is making debugging anything that you can't use on the simulator hugely frustrating.

On the first load logging generally works at least to start with, however more often than not logging will just stop as you do more things within the app. If I need make a change and it live reloads it pretty much always stops logging.

To Reproduce

tns run ios --bundle

Expected behavior logging should continue to work just as it does on the simulator.

Fatme commented 5 years ago

@dottodot,

however more often than not logging will just stop as you do more things within the app.

Can you please share the exact steps so we can reproduce the issue on our side?

It'll be great appreciated if you send us a sample project demonstrating the described behavior.

jasonstcyr commented 5 years ago

I'm having something somewhat related.

I'm running my unit tests. They we're working reliably for a long time but then something happening. It started maybe after updating to the newest NativeScript?

If I run my unit tests using tns test android it will always output the console.log statements reliably on the first run. When I got back to save something it'll re run (I also have to manually relaunch the NS app) and the console.log statement do not display.

They work reliably all the time in the iOS emulator.

miroslavaivanova commented 5 years ago

@jasonstcyr I logged it as separate issue because it is not related to the issue from this thread. @dottodot The issue seems resolved now. I'm closing it.