Opening html in browser (or, using any command)
See original GitHub issueHi, thanks the very neat extension.
I tried to configure the Code Runner to open html files in Chrome, but not working.
Config:
"code-runner.executorMap": {
"javascript": "node"
},
"code-runner.defaultLanguage": "javascript",
"code-runner.clearPreviousOutput": true,
"code-runner.saveFileBeforeRun": false,
"code-runner.executorMapByFileExtension": {
".html": "chrome.exe"
}
But I m getting below error:
[Running] chrome.exe "d:\angular-directive-demo.html"
'chrome.exe' is not recognized as an internal or external command,
operable program or batch file.
[Done] exited with code=1 in 0.176 seconds
I tried given the chrome.exe’s complete path as well, but same issue.
Is there any way to invoke any arbitrary command/exe?
Code Runner: 0.4.1 VSCode: 1.7.1 Windows 8.1
Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to access an HTML document in a browser
Find the HTML record you need to see, right-click on it, and pick Open with from the menu. You will see a full...
Read more >Open HTML file with Google Chrome using command-line
In general, the above command-line can be used to launch any GUI app to open associated file. open command is built into macOS....
Read more >How to Run a HTML File: 12 Steps (with Pictures) - wikiHow
1. Understand HTML. HTML stands for Hypertext Markup Language. HTML files are text files which represent the content and the layout of a...
Read more >How to Open HTML Files in Your Browser from Visual Studio ...
Visual Studio Code doesn't have a built-in method for launching HTML and other files in Google Chrome, but you can configure it to...
Read more >How to view an HTML file in the browser with Visual Studio ...
Now Press Ctrl + K followed by V, it will open your html in a near by tab. Tadaaa !!! Now emmet commands...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @manikantag , I use below config and work:
output:
Please check whether you have taken care of the back slash and the space of file path.
“code-runner.executorMapByFileExtension”: { “.html”: “"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"” } i am not using google chrome and i changed the path of the chrome.exe with current firefox browser executable which I found using the find location option in right click menu and now code runner is showing error as following " PS C:\Users\sunny\Downloads\dotfiles\mili-gitlab-repo\Documents\VSCode programs> “C:\Program Files\Mozilla firefox\firefox.exe” “c:\Users\sunny\Downloads\dotfiles\mili-gitlab-repo\Documents\VSCode programs\30daysofHTML\day2.html” ParserError: Line | 1 | … irefox.exe" "c:\Users\sunny\Downloads\dotfiles\mili-gitlab-repo\Docum … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Unexpected token ‘“c:\Users\sunny\Downloads\dotfiles\mili-gitlab-repo\Documents\VSCode | programs\30daysofHTML\day2.html”’ in expression or statement. " this is my code runner executor map “code-runner.executorMap”: { “javascript”: “node”, “php”: “C:\php\php.exe”, “python”: “python”, “perl”: “perl”, “ruby”: “C:\Ruby23-x64\bin\ruby.exe”, “go”: “go run”, “html”: “"C:\Program Files\Mozilla firefox\firefox.exe"”, “java”: “cd $dir && javac $fileName && java $fileNameWithoutExt”, “c”: “cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt”, “cpp”: “cd $dir && g++ -std=c++17 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt” },