{"action":"created","issue":{"url":"https://api.github.com/repos/standard-things/esm/issues/483","repository_url":"https://api.github.com/repos/standard-things/esm","labels_url":"https://api.github.com/repos/standard-things/esm/issues/483/labels{/name}","comments_url":"https://api.github.com/repos/standard-things/esm/issues/483/comments","events_url":"https://api.github.com/repos/standard-things/esm/issues/483/events","html_url":"https://github.com/standard-things/esm/issues/483","id":336669149,"node_id":"MDU6SXNzdWUzMzY2NjkxNDk=","number":483,"title":"Outputs by `console.log()` are not showing up in the Console panel of devtools","user":{"login":"Mensu","id":17307817,"node_id":"MDQ6VXNlcjE3MzA3ODE3","avatar_url":"https://avatars0.githubusercontent.com/u/17307817?v=4","gravatar_id":"","url":"https://api.github.com/users/Mensu","html_url":"https://github.com/Mensu","followers_url":"https://api.github.com/users/Mensu/followers","following_url":"https://api.github.com/users/Mensu/following{/other_user}","gists_url":"https://api.github.com/users/Mensu/gists{/gist_id}","starred_url":"https://api.github.com/users/Mensu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mensu/subscriptions","organizations_url":"https://api.github.com/users/Mensu/orgs","repos_url":"https://api.github.com/users/Mensu/repos","events_url":"https://api.github.com/users/Mensu/events{/privacy}","received_events_url":"https://api.github.com/users/Mensu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-28T15:24:08Z","updated_at":"2018-06-28T17:46:10Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI found that outputs by `console.log()` are not showing up in the Console panel of the developer tools of Chrome.\r\n\r\nFor example, I have an `index.js`\r\n\r\n```js\r\nglobal.originalConsole = console;\r\nrequire('esm')(module)('./main');\r\n\r\n```\r\n\r\nwhich requires `main.js`\r\n\r\n```js\r\nlet i = 0;\r\nsetInterval(() => {\r\n  i += 1;\r\n  originalConsole.log('original console', i);\r\n  console.log('esm console', i);\r\n}, 1000);\r\n\r\n```\r\n\r\nI start with `node --inspect=9229 index.js`, which tells me `Debugger listening on ws://127.0.0.1:9229/137fb2ca-8100-4eb1-9157-cf15ad15657b`.\r\n\r\nWith that knowledge I visit `chrome-devtools://devtools/bundled/inspector.html?ws=127.0.0.1:9229/137fb2ca-8100-4eb1-9157-cf15ad15657b` \r\n\r\nand find that **in the Console panel**, there is only \"original console\" lines, no \"esm console\" lines.\r\n\r\nHere's the repro repo: [esm-repro-issue-483](https://github.com/Mensu/esm-repro-issue-483)\r\n\r\nIt's also possible to reproduce the problem using the debugging tools of VSCode with proper configurations.\r\n\r\nI think it would better to take account of this scenario (debugging using dev tools) when replacing the original global `console`.\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/standard-things/esm/issues/comments/401117690","html_url":"https://github.com/standard-things/esm/issues/483#issuecomment-401117690","issue_url":"https://api.github.com/repos/standard-things/esm/issues/483","id":401117690,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTExNzY5MA==","user":{"login":"jdalton","id":4303,"node_id":"MDQ6VXNlcjQzMDM=","avatar_url":"https://avatars2.githubusercontent.com/u/4303?v=4","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T17:46:10Z","updated_at":"2018-06-28T17:46:10Z","author_association":"MEMBER","body":"Thanks @Mensu!\r\n\r\nThis was a mis-detection on my part. I was detecting inspect flags without the `=` use."}}
{"actor":{"display_login":"jdalton"}}