Add support for `console.log`
See original GitHub issueOverview
Brownie should support console.log
as implemented by Buidler
Specification
- Access to the functionality comes from an import:
import "@nomiclabs/buidler/console.sol";
- The imported contract is available at: nomiclabs/buidler/packages/buidler-core/console.sol
console
is a library.log
sends a call to an empty account with a particular signature depending on the param type(s) given. It will be possible to extract these from thedebug_traceTransaction
output.
Considerations
- How to handle importing
console.sol
without reliance on NPM? The solution will likely require expanding the brownie package manager. - The implementation must produce consistent results with buidler. Should examine their test cases around this and write similar ones for Brownie.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:19
- Comments:10 (1 by maintainers)
Top Results From Across the Web
console.log() - Web APIs - MDN Web Docs
The console.log() method outputs a message to the web console. The message may be a single string (with optional substitution values), ...
Read more >Let's extend console.log() - JavaScript in Plain English
It lets you output strings, arrays, and objects that help debug your code. The console is part of the window object, and is...
Read more >JavaScript Console.log() Example – How to Print to the ...
Just open the console, Ctrl+Shift+K or F12 , and in the top right you will see a button that says "Switch to multi-line...
Read more >Saving Browser Console Logs for Support
With a Chrome browser window open, hit the F12 button (usually located at the top of the keyboard above the Backspace key). ·...
Read more >JavaScript console.log() Method - W3Schools
Console log () · Definition and Usage · Note · Syntax · Parameters · More Examples · Browser Support · Report Error ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
how about now? because it looks like #1043 has been merged. @iamdefinitelyahuman
Emitting events with the data you want to log could be an alternative if you don’t want to use hardhat: https://permanentiteration.com/console-log-alternative-for-brownie/