mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Orphaned child processes when running electronize start #278
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @The-MAZZTer on GitHub (Feb 10, 2019).
Originally assigned to: @GregorBiswanger on GitHub.
I have launchSettings.json set to run electronize start (it may also happen from the command prompt).
If I run my program and then close the console window in an attempt to stop it, Visual Studio stops debugging and my console closes, but the Electron portion of the app continues running and I can see node and other processes continuing to run in Task Manager.
This can cause problems as if your program is not creating any UI (eg the ready-to-show bug) attempting to run the program again will fail as the compiled DLLs are in use and cannot be built.
@fydar commented on GitHub (Mar 9, 2019):
I get this issue so often, it's not just the Electron process that doesn't get cleaned up by my app and a load of other processes.
@GregorBiswanger commented on GitHub (May 16, 2019):
The terminal shows a print-out of the ongoing process. The explicit termination via the terminal is possible, but if this is detached, the process continues independently.
We can not change that. by the way, there will be an additional Visual Studio plugin that allows for direct debugging. This is intended to remedy such pain.
Is anyone of you familiar with the VSSDK Extensibility? I'm still looking for how I get a button in the debug area. :)
@Hecatron commented on GitHub (May 17, 2019):
Edit I've just noticed this myself when running under Linux
Although this doesn't seem to happen under windows
For debugging my plan is to setup apps which can also be run as websites (that don't dip into the electron api too much, by letting the .net code handle that side of things)
then debug it as a website first before deploying out as an application.
That way I can single step / debug both the .net code and any javascript / typescript in the IDE
@The-MAZZTer commented on GitHub (Apr 15, 2021):
I forgot I filed this bug report.
This is generally only a problem when debugging since in production the user is going to be closing by the application window anyway.
However if the electron host is launching the asp.net core application, it could use the following event to detect if the asp.net core app closes, and to exit if it does:
https://nodejs.org/api/child_process.html#child_process_event_exit
It could potentially do something similar with the electronize process, not sure.
@GregorBiswanger commented on GitHub (Mar 28, 2023):
🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉
With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!