-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
vscode-nix script cannot find the other executables #1369
Comments
Fix the debugger script to fix electron#1369, while still supporting the fix for electron#535.
same issue. The problem is |
to fix it the
to
|
I got the same issue on version 6.0.0-beta.52. So how about the following patch to the file #!/usr/bin/env bash
DIR="$( dirname "$( realpath "${BASH_SOURCE[0]}" )" )"
ARGS=$@
ARGS=${ARGS// /\~ \~}
node $DIR/../../../@electron-forge/cli/dist/electron-forge-start --vscode -- \~$ARGS\~ The only thing I try to fix this issue is to get the real path of the script file first, as showed on line 2 in the above code. |
@thinreyxu that works for me. Thanks! |
This is still an issue as of electron-forge @ 6.0.0-beta.61 Currently, patching this manually. Kinda brutal. Lets fix? |
@kresli thank you for this patch which worked with electron-forge 6.0.0-beta.61 on macOS with VSCode 1.62.3. As someone who is new to Electron in general this was a really confusing and unfortunate issue for beginners. |
What needs to happen to get this solved? A PR? |
Ran in to electron#1369 today. This PR is @thinreyxu 's patch which fixed the issue for me.
Yet another workaround or solution for debugging: In your
and another script in
(I don't need any extra arguments, so I have not looked into that topic). |
I just ran into this as well. There's a suggestion for a fix further up that works for me. Change: It seems like this has been the case for some time. What's in the way of your PR? Seems too simple to let sit like this. |
I ended up doing this - #1370 (comment) |
I am experiencing this issue and I tried to use the solution from @jpilgrim, since that didn't seem to require direct editing of electron-forge source code. My project also includes
Any ideas? I am still very new to electron and have been struggling for months to port our webapp over, dealing with issue after issue. As a new user it is incredibly frustrating and discouraging to never quite know if all the errors you are trying to deal with are because you did something wrong, or if the software is broken. Please make it so that something as fundamental as debugging is functional for the majority of users! Edit: I just realized I had some extra changes under
After removing that I'm no longer getting the "multiple plugins" error |
I'm having this problem as well using electron-forge 6.1.1 with MacOS 12.2.1. I tried using the original VSCode launch config from the Electron Forge Docs: {
"type": "node",
"request": "launch",
"name": "Electron Main",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-nix",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-win.cmd"
},
// runtimeArgs will be passed directly to your Electron application
"runtimeArgs": [
"foo",
"bar"
],
"cwd": "${workspaceFolder}"
} I solved it by simply pointing the runtimeExecutable directly at the Bash script's true location rather than the symlink to the same file that exists in - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-nix",
+ "runtimeExecutable": "${workspaceFolder}/node_modules/@electron-forge/cli/script/vscode.sh", The problem seems related to the expectation that this line from the script gets the location of th script gets the true location, but instead it gets the location of the symlink. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
Same issue still here with I came across this old fix as well which seems to have been reverted at some point. Reimplementing that PR seems to be a good solution. |
The problem identified at electron/forge#1369 persists. This updates the documentation along with the suggestion at electron/forge#1369 (comment)
Closing with the documentation workaround here. Let me know if there's additional work to be done here. |
Preflight Checklist
Issue Details
Expected Behavior
Using the launch configuration from https://www.electronforge.io/advanced/debugging in VS Code enables debugging for the new application.
Actual Behavior
The launch configuration errors with:
To Reproduce
yarn
v1.21.1npm
v6.13.4node
v10.16.3Additional Information
I'm guessing it's related to something about package nesting and/or symlinks?
The text was updated successfully, but these errors were encountered: