Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

cannot log message when react app be loaded by electron  #808

Copy link
Copy link

Description

@huyinghuan
Issue body actions

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')
);
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.