I've created an Electron app and I'm packaging it using Electron Builder. I'm using the AppX (Windows Store) format for Windows.
- How can I view the app's logs i.e. console.logs from main node process?
I need to be able to view logs for the packaged version of the app as the app launches fine without AppX packaging, but fails with it.
- On macOS, Linux and 'Windows with NSIS' instead of AppX, launching the app via the command line is sufficient to view logs
I've already tried launching AppX packages from the command line:
The only way to launch Windows Store apps from the command line is to follow these steps:
From here
- Run
explorer.exe shell:AppsFolder
in cmd- Find the app, and create it's shortcut on the desktop
- Open the shortcut's properties and copy the "Target" field
- Run
get-appxpackage > list.txt
in PowerShell- Open the file (located in
%USERPROFILE%
)- Find and make a note of the PackageFamilyName and InstallLocation corresponding to the Target name copied earlier
- Open the file AppxManifest.xml present in the InstallLocation
- Search for "Executable=" in the file, make a note of the value of "Application Id" above the line containing "Executable=".
- Run the command
explorer.exe shell:appsFolder\<PackageFamilyName>!<Application Id>
, substituting<PackageFamilyName>
for the Package Family name noted earlier and<Application Id>
for the Application Id noted earlier to run your app.
This works but doesn't actually connect node's stdout to the terminal