VSCode中的Chrome调试器-变量不可用

时间:2018-06-29 06:49:56

标签: reactjs google-chrome visual-studio-code

我已经启动了React应用程序的Chrome调试:

{
  "type": "chrome",
  "request": "launch",
  "name": "Launch Chrome against localhost",
  "url": "http://localhost:8080",
  "webRoot": "${workspaceFolder}"
}

应用程序运行时,它会在断点处停止,例如:

  isActive(index) {
    return index === this.state.activePanelIndex;
  }

但是在Debug ConsoleWatch窗口中,我都可以访问变量,例如(不悬停):

  

index ReferenceError:索引未定义

     

this.state.activePanelIndex TypeError:无法读取属性

     

“ unactivePanelIndex”(未定义this.state未定义)

那是为什么?我该如何解决?

0 个答案:

没有答案
相关问题