Hi, 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.
Hi @manikantag , I use below config and work:
"code-runner.executorMapByFileExtension": {
".html": "\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\""
}
output:
[Running] "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "d:\Try\test\test.html"
[Done] exited with code=0 in 0.252 seconds
Please check whether you have taken care of the back slash and the space of file path.
@formulahendry Working 👍
I tried and escaped all backslashes, but didn't quoted the whole path again in double quotes. Thanks.
Was this documented? or, did I miss it? If not, better to document this so that one can see in VSCode extension readme.
I have a sample to add interpreter PATH for ruby and php in https://github.com/formulahendry/vscode-code-runner#configuration , but I will add more details for it to take care of the back slash and the space of file path . #28
Most helpful comment
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.