0

My js module is like this:

/* `querystring` is outside of the func `foo` below. */
const querystring = require('querystring');

let foo = (params) => (dispatch, getState) => {

    // In Chrome Dev Tools I set a breakpoint here inside `foo` func.
    // And I want to reference `querystring` here in Chrome Dev Tools
    // And Chrome Dev Tools says it is not available. 

}

Here is a picture. Why does it happen? How to effectively reference a variable that is in a Closure in Chrome Dev Tools?

enter image description here

BTW, Closure.querystring isn't available either.

Green
  • 28,742
  • 61
  • 158
  • 247
  • Did you add them to the watch at some other point in the debugging (when perhaps they weren't available)? What happens if you hit the refresh button in the top right of the watch window, now that you're paused in a place where they should be available? – James Thorpe Sep 11 '17 at 14:46
  • @JamesThorpe, hitting the `Refresh` doesn't change the state of `querystring` variable - it remains ``. I added `querystring` to watch exactly on breakpoint stop. `querystring` should be available at any point because it is in a top most scope of the module and is defined the first in a file. – Green Sep 11 '17 at 15:18

0 Answers0