This is sort of a two-part question. I'm trying to play around with Copilot and used the beginners tutorial to reproduce the code which looks like this.
// find all images without alternate text
// and give them a red border
function process() {
var images = "cat_pics.html".getElementsByTagName("img")
for (var i = 0; i < images.length; i++) {
var image = images[i]
if (image.alt == "") {
image.style.border = "1px solid red"
}
}
}
There was only one change which was that changed the source of images to a local file.
However I ran this I received an error.
[Running] node "/Users/davidelks/Dropbox/Personal/tempCodeRunnerFile.js" /bin/sh: node: command not found
[Done] exited with code=127 in 0.008 seconds
The second question is specific to VS Code having switched to it from Sublime. I can see there are powerful tools but how would the debugger to get to the problem?