[已解决] 设定 vscode php debug 逾时期限的方法?

楼主: dream1124 (全新开始)   2019-05-13 16:37:29
大家好
php 新手想请教一下如何在 vscode 正确设定执行环境的问题。
我是用 vscode 开发 wordpress 的场景。
为了除错,我安装 vscode 的 php debug extensions 并照着该套件的指示安装 xdebug

https://github.com/felixfbecker/vscode-php-debug
开始除错之后发现请求逾时的时间太短,我根本来不及仔细观察执行状况。
从 php 中断执行之后,大概只要经过 2 ~ 3 分钟,IIS 就会在网页上回报 http
response code 500,请求逾时了。
为解决这个问题,我已经在 IIS 的站台管理界面设定请求逾时为 3600 秒,然后也在
php.ini 里面设定 max_execution_time = 3600,最后再重启站台和电脑,但是请求逾
时的期限好像没什么变化。
请问我还需要调整哪里的设定才能解决这个问题呢?
谢谢大家指教~
以下附上系统资讯:
Windows 7 ver 6.1 SP1 build 7601
IIS 7.5.7600.16385
php 7.2.3-nts-Win32-VC15-x64
php xdebug 套件 2.7.2-7.2-vc15-nts-x86_64
vscode v1.33.1
vscode php debug v1.13
vscode 的 debug 设定 (launch.json):
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
wordpress web.config 档内容:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*"/>
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory"
negate="true"/>
</conditions><action type="Rewrite" url="index.php"/>
</rule>
<rule name="WordPress: http://localhost" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule></rules>
</rewrite>
<defaultDocument>
<files>
<add value="index.php"/>
</files>
</defaultDocument>
</system.webServer>
</configuration>
第一道规则好像是 wordpress 启动后自己加上去的,但因为系统能动的关系,所以我就
没去调整了。

Links booklink

Contact Us: admin [ a t ] ucptt.com