为什么Chrome Dev Tools中没有关闭变量?怎么引用它们?

时间:2017-09-11 14:40:57

标签: javascript google-chrome closures google-chrome-devtools

我的js模块是这样的:

/* `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. 

}

这是一张照片。为什么会这样?如何在Chrome Dev Tools中有效引用Closure中的变量?

enter image description here

BTW,Closure.querystring也不可用。

0 个答案:

没有答案