VSCode運行html


1、將項目文件夾添加到工作區

 

 2、點擊“終端”,選擇“配置任務”

 

 3、選擇“使用模板創建tasks.json文件”

 

 4、選擇“Others”

 

 5、tasks.json新建,默認如下

 

 6、修改tasks.json

復制代碼
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "在Chrome中運行", "type": "process", // [shell,process] "command": "Chrome", "args": ["${file}"], "windows": { "command": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" }, "group": "build", "presentation": { // Reveal the output only if unrecognized errors occur. "reveal": "never" //[always,never,silent]  }, // Use the standard MS compiler pattern to detect errors, warnings and infos "problemMatcher": "$msCompile" } ] }
復制代碼

7、選中需要運行的html文件,按住Ctrl+Shift+B,選擇“在Chome中運行”

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM