CRYPTO NEWS

Coinbase NFT Marketplace Waitlist Soars Past 1.5 Million

Hardhat console.log doesn’t work in VSCode Remix extension

I installed the VSCode Remix Extension and I compiled(successfully) and deployed this contract: // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.6; // tried also with the commented line bellow, but no chance // import "../../node_modules/hardhat/console.sol"; import "hardhat/console.sol"; contract Person { constructor(string memory name) { m_name = name; console.log("Calling the constructor"); } function getName() public view returns(string memory)::Listen

I installed the VSCode Remix Extension and I compiled(successfully) and deployed this contract:

// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.6;  // tried also with the commented line bellow, but no chance // import "../../node_modules/hardhat/console.sol"; import "hardhat/console.sol";  contract Person {     constructor(string memory name) {         m_name = name;          console.log("Calling the constructor");     }       function getName() public view returns(string memory) {         console.log("Calling getName");         return m_name;     }       string private m_name; } 

however console.log did not print anything in the VSCode OUTPUT tab; executing getName() didn’t print Calling getName either.

Running the same contract in the Remix IDE works great:

enter image description here

Now I know that you can use the events API for logging purposes, but console.log is way too handy! I would very much like to stick with it.

Could there be any solution or plugin configuration/hack that can be done in order to solve this problem?

Coinbase NFT Marketplace Waitlist Soars Past 1.5 Million

Shopping cart
There are no products in the cart!
Continue shopping
0