electron-userland / electron-forge-templates

Templates bundled with Electron Forge <= 5 to create Electron apps using popular JavaScript frameworks
107 stars 23 forks source link

VSCode Debug: Template - React & Typescript #34

Closed mtompkins closed 7 years ago

mtompkins commented 7 years ago

Please describe your issue:

Referencing: https://github.com/electron-userland/electron-forge#debugging-your-application-through-vs-code

The initial spin-up prior to any modifications does not include (in the ../bin directory):

so attaching and debugging fails following the reference.

*Console output when you run electron-forge init with the environment variable `DEBUG=electron-forge:`. (Instructions on how to do so here). Please include the stack trace if one exists.**

Put the console output here

What command line arguments are you passing?

Put the arguments here

What does your config.forge data in package.json look like?

Paste the config.forge JSON object here

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to reproduce your problem.

MarshallOfSound commented 7 years ago

@mtompkins The default templates do not install electron-forge itself as a dependency so those executables do not exist. You would need to npm i electron-forge locally to get the forge and and other executables locally.

Assuming forge is installed globally those debug commands should be available on your path so you can remove the local node modules path to the executable completely and it will work.

mtompkins commented 7 years ago

Thanks for the quick reply @MarshallOfSound - it was more of an informational that the documentation is a bit misleading.

MarshallOfSound commented 7 years ago

@mtompkins Fair enough, I'll add a bit to indicate that you need electron forge installed locally for those scripts to exist 👍