Permalink
Browse files

debugger: support mirroring Date objects

* fixes #3203
  • Loading branch information...
1 parent 9f9c333 commit 9794d9089f714ebbc1f9aa8a7f30f13b01843795 @indutny committed May 2, 2012
Showing with 19 additions and 0 deletions.
  1. +2 −0 lib/_debugger.js
  2. +4 −0 test/fixtures/breakpoints.js
  3. +13 −0 test/simple/test-debugger-repl.js
View
@@ -541,6 +541,8 @@ Client.prototype.mirrorObject = function(handle, depth, cb) {
if (handle.className == 'Array') {
mirror = [];
+ } else if (handle.className == 'Date') {
+ mirror = new Date(handle.value);
} else {
mirror = {};
}
@@ -17,3 +17,7 @@ b();
setInterval(function() {
}, 5000);
+
+
+now = new Date();
+debugger;
@@ -143,6 +143,19 @@ addTest('c', [
/\d/, /\d/, /\d/, /\d/, /\d/
]);
+addTest('c', [
+ /break in .*breakpoints.js:\d+/,
+ /\d/, /\d/, /\d/, /\d/, /\d/
+]);
+
+addTest('repl', [
+ /Press Ctrl \+ C to leave debug repl/
+]);
+
+addTest('now', [
+ /\w* \w* \d* \d* \d*:\d*:\d* GMT[+-]\d* (\w*)/
+]);
+
function finish() {
process.exit(0);
}

0 comments on commit 9794d90

Please sign in to comment.