It looks like you're just double clicking the JS file. The browser isn't going to run an arbitrary JS file like that. If you want to debug JS files then use an IDE that supports it Visual Studio Code.
More often though you'll be using JS in the context of a web app. In that case you'll create a web app (or site) in Visual Studio that contains the server and client side code in a project. Then you'll run the debugger which loads your default HTML page in your browser. The browser then loads the JS linked by the HTML page. At that point you can debug your JS either from VS or via the browser's developer tools.
Alternatively you can create a dummy HTML page that has a script tag that references your JS file. Then load the HTML into the browser and use the browser's developer tools to debug the JS.
If you're looking to build a JS-only site then look into using nodejs and its tools instead of Visual Studio.