I am trying to create a dApp but the browser in visual studio code doesn't see the ethereum connection even though I've installed metamask on the running browser.
Here is my code (just to test the connection)
function testConnexion()
{
if(window.ethereum)
{
console.log("Active connection");
}
else if(!window.ethereum)
{
console.log("No connection")
}
}
I've linked that function to a button in a basic html file, each time I click on the button, the log is "No connection" even when my metamask is manually connected to my website.
Is it impossible to connect to a wallet in a visual studio browser or is it something that I am doing wrong ?
Regards