一:为VSC安装插件,一共为2个
1 '是Chrome的插件,2》白鹭插件
具体步骤
①:
二:配置发射。json/tasks.json
1 '按F5选择Chrome,可以生成发射。json
2》配置launch.json
①,加入配置:
<代码> { “名称”:“使用本Chrome调机试”, “类型”:“铬”, “请求”:“发射”,//拔募?“index . html”, :“url http://10.10.20.120:3000指数。html ",//使用外部服务器时,请注释掉文件,改用url,并将useBuildInServer设置为false”http://mysite.com/index.html “runtimeExecutable”:“C: \ \谷歌程序文件(x86) \ \ \ \ \ \程序\ \ Chrome浏览器。exe”//改成您的Chrome安装路径 “sourceMaps”:没错, “webRoot”:“$ {workspaceRoot}”, “preLaunchTask”:“构建”, “userDataDir”:“$ {tmpdir}”, “端口”:5433 }代码>
如下图:
3 '配置任务。json
原始文件:
换成如下文件:
<代码> { “版本”:“0.1.0”, “命令”:“白鹭”, “isShellCommand”:没错, “任务”:[ { “taskName”:“构建”, “showOutput”:“总是”, “参数”:( “构建”, “-sourcemap” ], :“problemMatcher tsc美元” }, { “taskName”:“干净”, “showOutput”:“总是”, “参数”:( “构建”, “e” ], :“problemMatcher tsc美元” }, { “taskName”:“发布”, “showOutput”:“总是”, “参数”:( “发布” ], :“problemMatcher tsc美元” } ] }代码>
结果如下:
三:按ctrl + shift + p→白鹭StartServer
开始启动游戏吧.........
====================================================================
将ctrl + p,当前页签不关闭的设置