How to include Chrome DevTools in Electron?

前端 未结 7 1223
小鲜肉
小鲜肉 2020-12-09 04:52

I\'m still new to Electron which I\'m currently following here.

I\'ve read this page regarding on how to include the Chrome DevTools so that I can debug my applicati

7条回答
  •  一生所求
    2020-12-09 05:22

    Most likely, Electron can't understand the path to the application folder you provided. You must provide the relative or absolute path to the application directory that holds package.json in it. E.g., if package.json file of your app is located at /home/user/my_awesome_app/package.json then in order to start the app you must issue the following command:

    electron /home/user/my_awesome_app
    

    Also note that main property in package.json file indicates the entry point for your application. In your case it must be like this:

     "main": "src/main.js"
    

提交回复
热议问题