Is designed for debugging code in mobile browsers
-
Usage in Node
npm install virtual-console
-
Usage in Browser
<script src="virtualConsole.js"></script>
Script must be connected separately, before the code. If you are using nodejs, you need to refer to the initialization of:
-
Usage in Node
require('virtual-console')(options)
-
Usage in Browser
virtualConsoleInit(options)
-
url: If you specify url, the console will appear if you have the proper lines in the url after the hash. Example:
require('virtual-console')({url: "console=true"})
yourhost.com#console=true -
inside: If the virtual Console is connected to the same file with the main code, you must specify this option
require(virtual-console)({inside: true})
, otherwise, the virtual console will not display the call string