Having difficulty debugging in a Edge browser in Visual Studio

rms2256 1 Reputation point
2021-05-16T14:19:12.177+00:00

I am trying to run a javascript program in Visual Studio 2019 (listed below) that utilizes a particular function; the prompt() function. However, I have read that node.js does not support the prompt() function and that I would need to run the program in a browser (preferably Edge) to accept input as the purpose of the function is to prompt a message and wait for a user to input data that is stored in a variable.

'use strict';
var msg = 'You entered:';
let promptInput = prompt("What would you like to enter");
console.log(msg);
console.log(promptInput);

However, I cannot run/debug/link my code into a browser. I have done research on a solution already, and was quite intrigued when I was able to update a dropdown menu option for the 'solution explorer' titled "View in Browser". However, whenever I click on the "View in Browser" option, it does nothing. I do not see any status updates, browser popups, or any noticeable changes to the IDE.

Any help would be greatly appreciated on this topic, as I have been working on it for some time now and made little to no headway.

Thank you,

  • rms2256
Microsoft 365 and Office Development Office JavaScript API
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. rms2256 1 Reputation point
    2021-05-17T12:37:00.707+00:00

    I discovered this drop down menu configuration page. I think I may be able to solve my problem using this, but am unaware of how to:

    97166-image.png

    0 comments No comments

  2. rms2256 1 Reputation point
    2021-05-30T22:37:05.317+00:00

    Any suggestions? I am still encountering the above problem and cannot run any libraries using the Microsoft Edge Developer Tools console.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.