Macbook, OSX 10.9 VsCode - Enterprise 2019
// Issue Description
I have a very simple JS function
function countup(n) {
if (n < 1) {
return [];
} else {
const countArray = countup(n - 1);
//debugger;
countArray.push(n);
return countArray;
}
}
console.log(countup(5));
What I need help with?
Run this with a debugger on vscode by adding breakpoints in between. When I try to use the launch.json config
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"file": "${workspaceRoot}/Test.js"
}
]
}
This basically renders the JS file in Chrome but does not execute the actual function. I have tried the same with a local server + chrome debugger extension in vs code.
How do I get this to work?