2017-02-26 10 views
2

私は電子クイックスタートチュートリアルで30分ほど作業しています。Electron - ブレークポイントはmain.jsでのみ動作しますが、index.jsでは動作しません

  • package.json
  • main.js
  • index.htmlを

私は起動時に変更をしたドキュメントから出発:ドキュメントは私に言ったように、私はこのようなfilestructureを作成しましたVisual StudioのコードでのF5に私のプロジェクトの開始を作るために.json:

 "type": "node", 
     "request": "launch", 
     "name": "Programm starten", 
     "program": "${workspaceRoot}/main.js", 
     "cwd": "${workspaceRoot}", 
     "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron", 
     "runtimeArgs": [ 
      "--enable-logging" 
     ] 

マイoncklick() - 関数はindex.jsに常駐し、それをr index.htmlでeferenced:

<script src="index.js"></script> 

VSC内でindex.js-breakpointsを動作させるにはどうしたらよいですか? Main.js-ブレークポイントは必要なだけ停止します。

Thxを piccus

答えて

2

あなたはこのようなあなたのlaunch.jsonを変更し、この文書 http://electron.rocks/debugging-electron-in-vs-code-revised/

ところで
{ 
    "name": "Debug", 
    "type": "chrome", 
    "request": "launch", 
    "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron", 
    "runtimeArgs": [ 
     "${workspaceRoot}", 
     "--enable-logging", 
     "--remote-debugging-port=9222" 
    ], 
    "sourceMaps": false 
} 

そのないタイプミスあなたがへのonclickごoncKlick機能を変更することができる場合()

を確認することができます
関連する問題