question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Value inconsistency when not using "Debug in Chrome"

See original GitHub issue

I am currently developing an app for iOS/Android. iOS does not have this issue. However, on my Nexus 6P, When converting strings such as this:

‘Fri Jul 24 2015 08:00:00 GMT+0900 (JST)’

into Date objects with var foo = new Date(), it seems valid when I have the Chrome Debugger on, yet when I turn it off, it becomes ‘Invalid Date’ in the Android Studio console, and the app cannot progress as it can’t convert it to a Date object.

I’m not sure which level of the stack this issue could be happening in, so addressing it here.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Naoto-Idacommented, May 10, 2016

FYI, when not using the debugger (I’m presuming it uses JSC?), it doesn’t like any datetime strings that contain anything related to timezones. Also, it doesn’t think dates separated by - are valid.

So I had to convert all my datetimes to “yyyy/MM/dd HH:mm:s” format for it to be convertible into a Date object when in debug/non-debug mode. Although, it lacks any timezone specs now.

0reactions
alexsmartenscommented, Apr 23, 2018

Hi there, I’m also having this problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Chrome console.log() inconsistency with objects ...
Log the array to the console with console.log() . Modify one of the inner array values, then console.log() will output the later value...
Read more >
Mobile Debugger Related Errors
Stop the debug session and close the tab being used for debugging in the unresponsive browser; start a new debug session. If the...
Read more >
A Guide To CSS Debugging
Debugging in CSS means figuring out what might be the problem when you have unexpected layout results. We'll look at a few categories...
Read more >
Is it possible to start debugging when a watch expression ...
So, I only want the execution to stop when c === 3. Debugging the entire while loop and check the variable value until...
Read more >
How To Debug Websites On Android With Different ...
This one can have the Chrome developer tools' complete access for your browser (in the device)! The process of debugging a website on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found