小编Nad*_* S.的帖子

无法使用PhpStorm + Vagrant + XDebug进行调试

我不能让XDebug在Windows 7机器上与PhpStorm和Vagrant合作.我已经按照每个教程来完成这项工作,但没有运气.

所以我试过的是:

  • PhpStorm始终监听调试连接
  • xdebug.ini文件包含以下内容:

zend_extension = "..../xdebug.so"
xdebug.remote_enable= 1
xdebug.remote_handler=dbgp
xdebug.remote_host= 33.33.33.10
xdebug.remote_port= 9000
xdebug.remote_connect_back= 1
xdebug.remote_autostart= 1
xdebug.remote_log = "...."
Run Code Online (Sandbox Code Playgroud)
  • 设置PhpStorm来连接localhost:808033.33.33.10,既没有运气.
  • 日志文件始终输出:

I: Checking remote connect back address.
W: Remote address not found, connecting to configured address/port: 33.33.33.10:9000. :-|
E: Could not connect to client. :-(
Run Code Online (Sandbox Code Playgroud)
  • 我尝试调试时,防火墙(ESET Smart Security)始终处于关闭状态
  • 设置路径映射,也没有工作

我只是不知道该怎么做,但我真的需要能够调试.
谢谢你的帮助!

xdebug phpstorm vagrant

21
推荐指数
1
解决办法
2万
查看次数

调用"DOMNodeInserted"事件时添加元素

我想在每个"喜欢"按钮(chrome扩展名)之后添加一个元素.由于帖子被添加到新闻Feed而不刷新页面,我必须添加一个事件监听器" DOMNodeInserted".但是当我尝试将after()函数放入其中时,它不起作用.

码:

    $("#contentArea").addEventListener("DOMNodeInserted", function(event) {
        $(".like_link").after('<span class="dot"> · </span><button class="taheles_link stat_elem as_link" title="???? ???&acute;?" type="submit" name="taheles" onclick="apply_taheles()" data-ft="{&quot;tn&quot;:&quot;&gt;&quot;,&quot;type&quot;:22}"><span class="taheles_default_message">???&acute;?</span><span class="taheles_saving_message">?? ????</span></button>');
        $(".taheles_saving_message").hide(); 
    });
Run Code Online (Sandbox Code Playgroud)

当我改变$("#contentArea")document崩溃的所有页面.

javascript jquery dom facebook

5
推荐指数
1
解决办法
9816
查看次数

Javascript:“顶级“ this”表达式”

当我有这样的对象时,我得到以下警告/提示/错误:

(
    function global(){...};
    function moreFunctions(){...};
)(this);
Run Code Online (Sandbox Code Playgroud)

“顶层'this'表达式。此检查报告Javascript'this'表达式的实例出现在对象文字或构造函数主体之外。此类表达式是合法的Javascript,并且引用了顶级的“全局” Javascript对象,但在很大程度上无用。” (由InspectionJS提供)

顺便说一下,jQuery具有(window)代替的功能(this)

我不明白这是什么意思。我所知道的是,第一个(和第二个之间的一切)都是对象,但是那又是什么呢?

之所以要这样做,是因为我刚刚发现了一个JS库源代码,并且以某种方式将其包含在现有脚本中后,一切都将停止工作。当我删除该(this);部分时,它没有使页面崩溃;但是图书馆根本没用。

javascript this

4
推荐指数
2
解决办法
3929
查看次数

文本区域中的语音识别

我想在文本区域中附加webkit语音识别插件.我目前拥有的:

<input type="text" x-webkit-speech />
Run Code Online (Sandbox Code Playgroud)

这样可行.但如果我输入:

<textarea cols="88" rows="6" x-webkit-speech />
Run Code Online (Sandbox Code Playgroud)

它不起作用.有没有办法做到这一点?也许用jQuery?

jquery html5 speech-recognition webkit google-chrome-extension

1
推荐指数
1
解决办法
8703
查看次数