0

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

  1. Run explorer.exe shell:AppsFolder in cmd
  2. Find the app, and create it's shortcut on the desktop
  3. Open the shortcut's properties and copy the "Target" field
  4. Run get-appxpackage > list.txt in PowerShell
  5. Open the file (located in %USERPROFILE%)
  6. Find and make a note of the PackageFamilyName and InstallLocation corresponding to the Target name copied earlier
  7. Open the file AppxManifest.xml present in the InstallLocation
  8. Search for "Executable=" in the file, make a note of the value of "Application Id" above the line containing "Executable=".
  9. 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

Lumin
  • 373
  • 6
  • 21

1 Answers1

0

I don't know how you can see the log but the part where you launch the app from the command line seems like overcomplicated.

Here is a thread on how to launch an app from an appx/msix from the command line properly:

Bogdan Mitrache
  • 10,536
  • 19
  • 34