简体   繁体   English

intellij logcat仅显示“ [object]”的json对象,如何显示整个json对象?

[英]intellij logcat display json object just “[object]”, how can I display the whole json object?

I'm using sencha touch , with node.js as a complier, debug in intellij IDE. 我正在使用sencha touch和node.js作为编译器,在intellij IDE中进行调试。 and I have 3 question with the environment: Here is the log in logcat. 我对环境有3个问题:这是登录logcat。

11-21 09:48:18.309: INFO/Web Console(6076): result [object] at file:///android_asset/www/app.js:1 11-21 09:48:18.309:INFO / Web控制台(6076):结果[object]位于file:///android_asset/www/app.js:1

1、Can't display the whole json object ,what I expect is something like : result:{'val':'123', 'val2':'456'} 1,无法显示整个json对象,我期望的是:result:{'val':'123','val2':'456'}

2、Console.log('result ', result) ----- this is not from app.js and the line is not line 1. (compressed?), How can I see the real file and the real line. 2,Console.log('result',result)-----这不是来自app.js,并且该行也不是第1行。(压缩?),如何查看真实文件和真实行。

3、My project is complier as node.js , and open the folder as a web project, so I can't see the android logcat. 3,我的项目编译为node.js,并以Web项目的形式打开该文件夹,所以看不到android logcat。 I need to open another android project to see the logcat. 我需要打开另一个android项目才能看到logcat。

any suggection is appreciated. 任何建议都值得赞赏。 thx. 谢谢。

  1. It's a long journey for a console.log to be displayed in the Android Log. 要在Android日志中显示console.log,这是一个漫长的旅程。 I'd suggest you output JSON objects with JSON.stringify(obj) . 我建议您使用JSON.stringify(obj)输出JSON对象。

  2. Probably a compressed JavaScript. 可能是压缩的JavaScript。 Use uncompressed for testing (Grunt!) 使用未压缩的进行测试(糟糕!)

  3. I think you can just change to the Android view. 我认为您可以更改为Android视图。 If this is not possible, include your Android project as a module of your Web-Project. 如果无法做到这一点,请将Android项目作为Web项目的模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM