如果请求是从web-worker内部开始的,Xdebug会不会在断点处停止?我正在做一个fetch()请求。
fetch(datatable_instance_defaults.pathToSqlFile + 'returnSqlRes.php',
{
headers: {
'Accept': 'text/plain',
'Content-Type': 'application/x-www-form-urlencoded'
},
method: "post",
body: JSON.stringify(sql)
})
.then(function (res) {
return res.json();
})发布于 2017-05-12 18:11:23
由于根据DedicatedWorkerGlobalScope,web-worker API不能访问会话存储,您的Xdebug会话cookie不能被传递到服务器,因此它无法从主线程识别您打开的Xdebug会话。
您可以临时将Xdebug GET参数添加到您的XDEBUG_SESSION_START以启动新的Xdebug会话。(也请参阅xdebug的the documentation )
fetch(datatable_instance_defaults.pathToSqlFile + 'returnSqlRes.php?XDEBUG_SESSION_START=session_name',这样做有点不方便,但是我想插件开发人员需要想出一种方法来保持Xdebug会话,或者为服务工作者请求重新启动它。
https://stackoverflow.com/questions/43929905
复制相似问题