Is it possible in Google Chrome's Developer Tools (Developer -> Developer Tools or ctrl+shift+i) when inspecting script's date variables to see their values?
For example, Google Chrome:
end_date: Date
start_date: Date
Firefox:
end_date: Mon Nov 01 2010 00:00:00 GMT+0200 {}
start_date: Fri Oct 01 2010 00:00:00 GMT+0300 {}
This problem can be solved in C开发者_StackOverflowhrome by adding new watch: date_object.toString() but that is not really convenient, maybe there is some other way?
Update: Sorry i didn't specify it in the original question - date is not displayed on the Scripts tab in the 'Watch expressions', 'Scope variables' sections.
I'm not quite understand your question. As I can see the debugger is showing the Date in format you want.
Could you please provide a use case for your problem.
<html>
<title>test</title>
<head>
<script>
function test()
{
var t = new Date();
}
setTimeout(test, 1000);
</script>
</head>
<body>
</body>
</html>
There is a WebKit's bug (again at 2011-11-05): https://bugs.webkit.org/show_bug.cgi?id=71605
So just add ".toString()" to a watching variable:
精彩评论