Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug arguments with Electron #24793

Closed
Hum4n01d opened this issue Apr 14, 2017 · 2 comments
Closed

Debug arguments with Electron #24793

Hum4n01d opened this issue Apr 14, 2017 · 2 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@Hum4n01d
Copy link

Hi, I'm developing an Electron app in VSCode but I can't figure out how to debug it. The way to normally run in in the terminal is like this: electron-forge start. Inside of VSCode, I'm trying to run it like this:

{
    "name": "Launch Electron",
    "type": "node",
    "args": [
      "start",
      "--debug-brk=5858",
      "--nolazy"
    ],
    "program": "${workspaceRoot}/src/main.js", // ensure this is path to main.js file
    "cwd": "${workspaceRoot}",
    "port": 5858,
    // as you have noted, this is also important:
    "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-forge"
  }

And the debug console shows this:

/Users/Hum4n01d/Desktop/Tech/Electron/Amango/node_modules/.bin/electron-forge --nolazy src/main.js start --debug-brk=5858 --nolazy 
✔ Checking your system
  error: unknown option `--nolazy'

The problem is, VSCode adds a --nolazy flag before the start argument as well as at the end which throws off electron-forge. How do I remove the flag or put it behind the others?

  • VSCode Version: Version 1.12.0-insider (1.12.0-insider)
  • OS Version: macOS Sierra 10.12.4
@Hum4n01d
Copy link
Author

Related: electron/forge#46 #16173

@isidorn
Copy link
Contributor

isidorn commented Apr 24, 2017

You can checkout how we are debugging vscode which is also an electron app here. Note that we are using the chrome debugger for this

As to how debug electron-forge I am not sure, but I think this is a good candidate for a stack overflow question and I believe the community will help you solve this.
fyi @roblourens @weinand as they might have additional ideas

@isidorn isidorn closed this as completed Apr 24, 2017
@isidorn isidorn added debug Debug viewlet, configurations, breakpoints, adapter issues *question Issue represents a question, should be posted to StackOverflow (VS Code) labels Apr 24, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants