electron-vite-react icon indicating copy to clipboard operation
electron-vite-react copied to clipboard

debugging is not working in VSCode

Open lifeiscontent opened this issue 3 years ago • 9 comments

I tried setting the same breakpoints outlined in the preview of the readme and they don't seem to be working.

this is my version info for VSCode:

Version: 1.71.0
Commit: 784b0177c56c607789f9638da7b6bf3230d47a8c
Date: 2022-09-01T07:25:10.472Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.14.0-1050-oem snap
Sandboxed: No

I'm also running Ubuntu 20.04 LTS

lifeiscontent avatar Sep 02 '22 17:09 lifeiscontent

Can you provide a minimal reproduction Demo?

caoxiemeihao avatar Sep 03 '22 00:09 caoxiemeihao

@caoxiemeihao the template itself is a reproduction

electron-vite-react-debug.gif

this doesn't work on Linux.

lifeiscontent avatar Sep 06 '22 17:09 lifeiscontent

Ubuntu? I may need a Linux system 😅

caoxiemeihao avatar Sep 07 '22 02:09 caoxiemeihao

@caoxiemeihao I'm using a variant of ubuntu, so that should yield similar results. :)

lifeiscontent avatar Sep 08 '22 22:09 lifeiscontent

Same issue as @lifeiscontent , on Windows 10, Node 18. Breakpoints don't trigger.

HZSamir avatar Mar 12 '23 07:03 HZSamir

Debug is also not working for me. Windows 11 Node v20.1.0. Task starts then hangs.

SnekCode avatar Nov 13 '23 17:11 SnekCode

启动 我是Windows11,node18.16.0是可以调试前端页面的...

RSS1102 avatar Nov 15 '23 10:11 RSS1102

Doesn't work for me either, can't access the URL:

❯  cd /home/stan/projects/personal/wago-app ; /usr/bin/env VITE_DEV_SERVER_URL=http://localhost:5174/ 'NODE_OPTIONS= --require /home/stan/.vscode-server/bin/903b1e9d8990623e3d7da1df3d33db3e42d80eda/extensions/ms-vscode.js-debug/src/bootloader.js ' 'VSCODE_INSPECTOR_OPTIONS=:::{"inspectorIpc":"/tmp/node-cdp.124098-8884dbf6-23.sock","deferredMode":false,"waitForDebugger":"","execPath":"/usr/bin/node","onlyEntrypoint":false,"autoAttachMode":"always","mandatePortTracking":true,"fileCallback":"/tmp/node-debug-callback-d04af5c6d02f0815"}' /home/stan/projects/personal/wago-app/node_modules/.bin/electron --no-sandbox --remote-debugging-port=9229 . 
Debugger listening on ws://127.0.0.1:53907/901b01f4-38dc-4776-a40e-82d34dc16d8a
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Debugger listening on ws://127.0.0.1:53481/fb560429-0bcb-444c-9a90-ffa31d3b7455
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.

DevTools listening on ws://127.0.0.1:9229/devtools/browser/bfd8ee3c-8db7-42a3-b00f-97674f3be1ea
[132812:0227/000913.519427:ERROR:connection.cc(575)] Cannot send request of length 31158756
(node:132812) ExtensionLoadWarning: Warnings loading extension at /home/stan/.config/wago-app/extensions/lmhkpmbekcpmknklioeibfkpmmfibljd:
  Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details.
  Permission 'notifications' is unknown or URL pattern is malformed.
  Permission 'contextMenus' is unknown or URL pattern is malformed.

(Use `electron --trace-warnings ...` to show where the warning was created)
Added extension: Redux DevTools { class: 'main' }
Added extension: React Developer Tools { class: 'main' }
(node:132812) electron: Failed to load URL: http://localhost:5174/ with error: ERR_CONNECTION_REFUSED
[132812:0227/000914.263168:ERROR:CONSOLE(1)] "Request Network.loadNetworkResource failed. {"code":-32602,"message":"Unsupported URL scheme"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
^C/home/stan/projects/personal/wago-app/node_modules/electron/dist/electron exited with signal SIGINT
Waiting for the debugger to disconnect...

Stanzilla avatar Feb 26 '24 23:02 Stanzilla

On windows I got this to work by adding the following line to my Debug Main Process section:

"attachSimplePort": 0

e-gehlen avatar Jul 03 '24 12:07 e-gehlen