How to write Electron debug messages into a file? - debugging

I am developing an Electron app and I want to write it's debug messages into a log file. If I start my app by executing electron electron --debug=5858, then the debug output shows up in my console.
I can grab the console output from the command-line by attaching > debug.log to my cmd statement but I wonder if there is also a programmatic way to save the debug logs for Electron's main process?
My main goal is to be able to write debug logs from the main process when distributing my app.

Related

How can I add terminal console messages in mochawesome report

I am trying to automate accessibility testing using cypress-axe .I want to add the terminal console messages to my mochaweome report.

MacOS creating launch agent in a console app not working

I know how to create a launch agent with a normal application say "myLaunchd" and setting "Application is agent" to "YES" and then copying the "myLaunchd.app" to the main app's Contens/Library/LoginItems.
But I need agents, which will be created by some scripts and the main-app's bundle-identifier will be provided through command line arguments.
I tried with a console app, tried using it as launch agent, but it doesn't work expected. I noticed that a normal app keeps running until it is closed (if "Application is agent" is set to "NO"). So to achieve similar effect I forced the console app to run-infinitely using while(1), but no luck.
Any suggestion will be appreciated.

Open Console app to show Unified Logging logs

My application uses os_log. When it's done with a task, I display a UserNotification. When the user clicks the notification, I want to display the logs created via through the Apple Unified System Logging.
If I were simply logging to a file, I would execute a Process(NSTask) with something like open /path/to/mylogs.log and this would open Console to show the logs. However, I'm using Unified System Logging through the os_log command. What Terminal command can I issue to open Console and have Console display my logs?

Does google play services for Unity use the profiler?

I am trying to debug my game in logcat but when I add the script debugger in the build settings my logcat gets flooded with profiler is only supported in Unity Pro.. Since I'm not using the profiler and only use the Google Play Services as a 3th party script I suspect it of starting the profiler.
If so, how do I turn that off so I can debug properly? If not, what else could it be?
I have been trying to filter the text message profiler is only supported in Unity Pro. out of logcat but without success. I'm using the UI monitor.bat in the tools map that come with the Android-SDK. This should be a workaround.
According to the documentation: http://docs.unity3d.com/Manual/Profiler.html - the profiler is a Pro only feature.
The profiler is different from the debug log messages.
To get debug messages out of my app, I call Debug.Log("....") in my scripts, and just run adb logcat and the messages show up:
I/Unity (12241): Status Update: Starting sign-in...

How to avoid the message "The app didn't start in the required time." while a debugger is attached?

I'd like to debug a Windows Store App, but when I attach a debugger the app is quickly killed and I get the message "The app didn't start in the required time."
How do you debug a running Windows Store App if Windows is going to kill the app as soon as you break in the debugger?
The command line tool PLMDebug, which is part of the Debugging Tools for Windows package, can be used to exempt an app from the Process Lifetime Management (PLM) policies. When put into debug mode, an app will not be subject to termination and will not be automatically suspended.
Usage:
plmdebug /enableDebug <PackageFullName> [OptionalDebuggerCommandLine]

Resources