You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] The --debug CLI flag never starts the app #5409
marktext --debug, which --help and docs/end-user/CLI.md advertise as "Enable debug mode", never starts the app. Node's CLI parser inside Electron claims the flag before MarkText sees it and aborts:
electron: [DEP0062]: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` and `node --inspect-brk` instead.
The process exits with code 9. --debug=1 fails the same way. Other flags are unaffected — --verbose, --user-data-dir, --safe all start the app normally — and the documented environment variable MARKTEXT_DEBUG=1 works, so debug mode itself is reachable, just not through this flag.
Possible directions (not verified):
Rename the flag to something Node doesn't claim, keeping MARKTEXT_DEBUG as it is.
Or drop --debug from --help and CLI.md and point at MARKTEXT_DEBUG=1.
Or check whether the enableNodeCliInspectArguments Electron fuse makes Node ignore these arguments, which would also harden packaged builds.
Steps to Reproduce
From a terminal, run a packaged MarkText with the flag, in a throwaway profile so nothing else is touched: <MarkText>/Contents/MacOS/marktext --user-data-dir /tmp/mt-debug --debug
Expected Behavior
MarkText starts with debug mode on, the same as MARKTEXT_DEBUG=1 marktext.
Actual Behavior
No window appears. The process prints the DEP0062 message above and exits with code 9.
Activity
fix(desktop): let the --debug flag reach MarkText in packaged builds (m…