简体   繁体   English

为什么无法为intellij进行js调试?

[英]Why doesn't work js debug for intellij?

I am working with intellij and want to debug javascript. 我正在使用intellij,并想调试javascript。 My debug configuration has "with javascript debugger". 我的调试配置具有“使用javascript调试器”。 I put breakpoint on javascript variable, but I get error "ReferenceError: eventsArr is not defined" at javascript console. 我将断点放在javascript变量上,但在javascript控制台上收到错误“ ReferenceError:eventsArr未定义”。

And at ide I cann't evaluate this variable. 而且,我无法评估此变量。

How can I debug javascript with intellij and js console? 如何使用intellij和js控制台调试javascript?

Screen: 屏幕:

ide: ide:

http://www.foto-me.ru/v.php?id=2c4d0de3efc7c42490645cc870dcefca http://www.foto-me.ru/v.php?id=2c4d0de3efc7c42490645cc870dcefca

js console js控制台

http://www.foto-me.ru/v.php?id=b2dd3ceeb38e9443428898b4e192b2ec http://www.foto-me.ru/v.php?id=b2dd3ceeb38e9443428898b4e192b2ec

Thanks. 谢谢。

I think the refence file is missing. Add the file "_references.js" in your folder Scripts. And you have to reference all of the script files in this file.

Exemple _references.js file :

/// <autosync enabled="true" />
/// <reference path="jquery.validate.js" />
/// <reference path="respond.matchmedia.addlistener.js" />
/// <reference path="respond.js" />
/// <reference path="modernizr-2.7.1.js" />
/// <reference path="jquery.validate.unobtrusive.js" />
/// <reference path="jquery-2.1.0.js" />
/// <reference path="bootstrap.js" />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM