Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

debugger: support mirroring Date objects

* fixes #3203
  • Loading branch information...
commit 9794d9089f714ebbc1f9aa8a7f30f13b01843795 1 parent 9f9c333
Fedor Indutny authored
2  lib/_debugger.js
@@ -541,6 +541,8 @@ Client.prototype.mirrorObject = function(handle, depth, cb) {
541 541
542 542 if (handle.className == 'Array') {
543 543 mirror = [];
  544 + } else if (handle.className == 'Date') {
  545 + mirror = new Date(handle.value);
544 546 } else {
545 547 mirror = {};
546 548 }
4 test/fixtures/breakpoints.js
@@ -17,3 +17,7 @@ b();
17 17
18 18 setInterval(function() {
19 19 }, 5000);
  20 +
  21 +
  22 +now = new Date();
  23 +debugger;
13 test/simple/test-debugger-repl.js
@@ -143,6 +143,19 @@ addTest('c', [
143 143 /\d/, /\d/, /\d/, /\d/, /\d/
144 144 ]);
145 145
  146 +addTest('c', [
  147 + /break in .*breakpoints.js:\d+/,
  148 + /\d/, /\d/, /\d/, /\d/, /\d/
  149 +]);
  150 +
  151 +addTest('repl', [
  152 + /Press Ctrl \+ C to leave debug repl/
  153 +]);
  154 +
  155 +addTest('now', [
  156 + /\w* \w* \d* \d* \d*:\d*:\d* GMT[+-]\d* (\w*)/
  157 +]);
  158 +
146 159 function finish() {
147 160 process.exit(0);
148 161 }

0 comments on commit 9794d90

Please sign in to comment.
Something went wrong with that request. Please try again.