question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chromium command-line logging flags behave differently when specified in package.json

See original GitHub issue

NW.js version 0.16.1 Windows 10 Software written on Mac OS 10.12.2

I am experiencing different behaviour when using Chromium’s --enable-logging flag as part of a NW.js application. On a Windows 10 machine, specifying the logging flag as part of the package.json "chromium-args": "--enable-logging --v=1" spawns two extra prompt windows in addition to the main window. This behaviour does not occur on Windows 7.

Searching the Chromium documentation suggested adding the --no-sandbox flag would solve this issue. Adding it to the package.json file did not change the behaviour.

However, providing the logging flag through the command line and not in the package.json file yields the desired result.

"App Name.exe" --enable-logging --v=1 The log file is generated as expected and no extra windows are spawned on launch. Why is there a difference when I specify the argument on the command line vs. in the chromium-args section of the package.json file? And secondly, how can I get the desired behaviour by specifying everything in the package?

Same question posted on SO: http://stackoverflow.com/questions/41880316/nw-js-chromium-logging-flags-behave-differently-when-specified-in-package-json

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
semmelcommented, Oct 12, 2017

Great work! Launching from a shortcut with --enable-logging or specifying that switch in package.json’s chromium--args the console windows no longer show up! Thank you!

  • NW.js v. 0.25.5 (nightly) (normal build)
  • Windows 10 Prof. (x64)
1reaction
rogerwangcommented, Oct 4, 2017

just fixed the console window in git. It will be available in the next nightly build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

List of Chromium Command Line Switches - Peter Beverloo
Some change behavior of features, others are for debugging or experimenting. This page lists the available switches including their conditions and descriptions.
Read more >
Chromium Command Line Switches Cheat Sheet - Kapeli
If this flag is set, enable data roaming in the cellular network by default upon system start if it's an unmanaged device. This...
Read more >
Command Line Options - NW.js Documentation
You use following command line options when starting NW.js to change some default behaviors. About command line arguments. When a user uses your...
Read more >
How to enable logging - The Chromium Projects
To enable logging, launch Chrome with these command line flags: ... --log-file=c:\src\log.txt as well also specifying the --enable-logging command line.
Read more >
Different main entry point in package.json for node and browser
The behavior is standardized here: https://github.com/defunctzombie/package-browser-field-spec. Although this specification is unofficial, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found