-
Notifications
You must be signed in to change notification settings - Fork 963
Closed
Labels
help-wantedThis issue has an actionable itemThis issue has an actionable itemneeds-documentationThis issue or change requires additional documentationThis issue or change requires additional documentationpr-welcomeThis issue has an approved change; a pull request would be appreciatedThis issue has an approved change; a pull request would be appreciated
Description
I create a react app and use debug
, debug(xxx)
can work well on browser. but on electron
user window.loadUrl("http://localhost:3000")
load page, open electron dev tools, debug()
cannot work.
code demo: https://github.com/huyinghuan/debug-issue
setup install deps:
cd $project
yarn install
cd ui
yarn install
run react app
cd $project
cd ui
yarn start
open browser, http://localhost:3000
in console
debug work well.
run electron:
new terminal
cd $project
yarn start
when loaded page, in dev tools
debug output nothing.
react app index.js:
import React from 'react';
import ReactDOM from 'react-dom';
import Debug from "debug";
const debug = Debug("ui:App");
localStorage.debug = "ui:*"
debug("hello")
ReactDOM.render(
<React.StrictMode>
<div className="App">
debug test
</div>
</React.StrictMode>,
document.getElementById('root')
);
Metadata
Metadata
Assignees
Labels
help-wantedThis issue has an actionable itemThis issue has an actionable itemneeds-documentationThis issue or change requires additional documentationThis issue or change requires additional documentationpr-welcomeThis issue has an approved change; a pull request would be appreciatedThis issue has an approved change; a pull request would be appreciated