# d3.csv of https://file.csv returns \`property undefined\` within script, but OK if defined in separate cell ?

**URL:** <https://talk.observablehq.com/t/d3-csv-of-https-file-csv-returns-property-undefined-within-script-but-ok-if-defined-in-separate-cell/1610>\
**Category:** Help\
**Created:** [January 27, 2019, 12:32pm UTC](https://talk.observablehq.com/t/d3-csv-of-https-file-csv-returns-property-undefined-within-script-but-ok-if-defined-in-separate-cell/1610 "2019-01-27T12:32:55Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [January 28, 2019, 1:14am UTC](https://talk.observablehq.com/t/d3-csv-of-https-file-csv-returns-property-undefined-within-script-but-ok-if-defined-in-separate-cell/1610/7 "2019-01-28T01:14:21Z")

</div>

I _highly_ recommend familiarizing yourself with your browser’s debugger. Anytime you don’t understand why the code is doing what it is, you can step through it line-by-line and inspect values to see where things start to go astray. It’s not always a magic bullet, but it’s a powerful tool for understanding and fixing code. Like here, you could have seen pretty quickly that d3.csv returned a Promise object rather than the expected array.

You can use your debugger within Observable, too. Add a debugger statement to a cell, pop open the debugger, then hit the play button or Shift-Enter. For example:

```auto
{
  debugger;
  for (let i = 0; i < 10; ++i) {
    yield i;
  }
}

```

---

_[View the full topic](https://talk.observablehq.com/t/d3-csv-of-https-file-csv-returns-property-undefined-within-script-but-ok-if-defined-in-separate-cell/1610)._
