Yes
console.dir() isn't showing full object but a part.
Both
tns --version
to fetch it) 4.1.2node_modules/tns-core-modules/package.json
file in your project) 4.1.0"tns-android"
and "tns-ios"
properties in thepackage.json
file of your project) 4.1.3, 4.1.1console.dir(app.android.startActivity);
or any big objects
JS: ==== object dump start ====
JS: constructor()
JS: isNativeScriptActivity: "true"
JS: _callbacks: {}
JS: __parent()
JS: __child()
JS: onCreate()
JS: onNewIntent()
JS: onSaveInstanceState()
JS: onStart()
JS: onStop()
JS: onDestroy()
JS: onBackPressed()
JS: onRequestPermissionsResult()
JS: onActivityResult()
JS: super: com.tns.NativeScriptActivity@bff4fc8
JS: <init>()
JS: addContentView()
JS: attachBaseContext()
JS: closeContextMenu()
JS: closeOptionsMenu()
JS: createPendingResult()
JS: dismissDialog()
JS: dismissKeyboardShortcutsHelper()
JS: dispatchGenericMotionEvent()
JS: dispatchKeyEvent()
JS: dispatchKeyShortcutEvent()
JS: dispatchPopulateAccessibilityEvent()
JS: dispatchTouchEvent()
JS: dispatchTrackballEvent()
JS: dump()
JS: enterPictureInPictureMode()
JS: findViewById()
JS: finish()
JS: finishActivity()
JS: finishActivityFromChild()
JS: finishAffinity()
JS: finishAfterTransition()
JS: finishAndRemoveTask()
JS: finishFromChild()
JS: getActionBar()
JS: getApplication()
JS: getCallingActivity()
JS: getCallingPackage()
JS: getChangingConfigurations()
JS: getComponentName()
JS: getContentScene()
JS: getContentTransitionManager()
JS: getCurrentFocus()
JS: getFragmentManager()
JS: getIntent()
JS: getLastNonConf...
But before it showed full logs.
Hi @jibon57,
I investigate further this case and found that this is created by design because in some cases the dumped content in the console was more than it is needed. Review issue #1026. Currently, the messages sent to logcat are automatically truncated after 1024 symbols. However, you can control the message size while setting up maxLogcatObjectSize
Check this comment.
I'm getting something similar to this on iOS, logs are being cut off. I can't find any mention of maxLogcatObjectSize
in the iOS documentation, is there a similar flag for it?
Similar problem on iOS. Maybe somebody help?
Hi guys; to my knowledge their isn't a setting like that on iOS. I maintain a list of flags http://fluentreports.com/blog/?p=581
However, what I have seen before many times is an issue with NODE when it is processing the data it truncates it. What you can try doing is depending on if it is a simulator or real device is this blog:
http://fluentreports.com/blog/?p=545
And see if your information is truncated still outside of TNS. If it is NOT truncated; then the issue is with the CLI; if it is truncated; then maybe they did add a flag that I haven't seen... ;-)
I have the same problem, this must not be closed, i need to print large JSON objects or also a pay receipt from the app store (sandbox environment) but it gets stripped on IOS, i tried;
Even just getting the full error context of some logs would be amazing.
How am I meant to understand what this is if it's truncated?
@Eonfuzz you could try debugging using chrome Dev tools for see full logs but you can only see it if the error happens after the app has been started and fully connected to the dev tools and not before 馃槥
Rather annoying that it is truncated...
set the maxLogcatObjectSize
in the app/package.json to a number and it will show. Bigger number means bigger log.
{
"android": {
"v8Flags": "--expose_gc",
"markingMode": "none",
"maxLogcatObjectSize": 2048
},
"main": "main",
"name": "sfgdsfg",
"version": "1.0.0"
}
Most helpful comment
I'm getting something similar to this on iOS, logs are being cut off. I can't find any mention of
maxLogcatObjectSize
in the iOS documentation, is there a similar flag for it?