RunMacro Documentation
Learn RunMacro from basics to advanced.
Everything you need to start and master RunMacro — from basic commands to advanced automation workflows.

Diagnose RunMacro logs and export a support bundle
After a failure, open Tools › View log in Studio or View log in Runner, then choose Medium - Free for on-device analysis. Select Smart (AI) only when sending a risk-reduced payload that may still contain secrets to a configured provider is acceptable. For support, export the ZIP and inspect every text file and screenshot before sharing it.
Prerequisites
- Reproduce the failure and preserve the visible log and latest error context; do not clear the widget or overwrite evidence with many new runs.
- In Studio, open Tools › View log or More › View log; in Runner, press View log.
- Smart needs at least one enabled provider, a valid API key and network access. Medium has no key or network prerequisite.
- A writable ZIP destination is required; RunMacro appends
.zipwhen the chosen name has no extension. - For a Studio desktop failure screenshot, screenshot-on-failure must be enabled; browser/CDP contexts manage capture separately.
- The person exporting the bundle must review it locally before sending it over an approved support channel.
Supported modes
- Desktop Mode — Studio and Runner share the diagnosis engine. Full-screen Desktop failure capture is off by default and follows the setting; Studio test runs explicitly disable capture.
- Browser Mode — Diagnosis may add derived CDP evidence such as port, tab, title or URL. Browser contexts can capture the failing tab, while profile data, cookies and live browser state are not bundled as separate artifacts.
- QMacro Runner — Runner exposes inline Medium/Smart diagnosis but has no Copy log, Clear log, or Go to error row controls. The visible Settings › Error diagnosis action actually exports a support ZIP; that path omits error context, so no error_report.json or screenshot is added.
What it does
Log diagnosis combines the visible runtime log, latest structured error context, and command list to identify a failing row, evidence, and practical fixes. Medium - Free is deterministic and entirely local. Smart (AI) prepares the Medium fallback and sends text risk-reduced by structured key redaction plus regex filtering to configured providers; screenshots are excluded. Individual sections have local limits, but there is no global payload byte/token cap and allowlisted context values can be unbounded. AI may fill a row when local analysis has none, but cannot replace an established runtime row. Separately, Export support log writes a ZIP with environment details, filtered settings, path summaries, log tails, and a manifest. Studio may attach the latest error report and raw failure screenshot.
When to use it
- A run stops, returns false or throws, and the responsible row or root cause is not obvious.
- You need to separate timeout, CDP, selector, image, file, permission or Label/Goto failures before changing the workflow.
- Support needs a structured environment-and-log snapshot without receiving the PMacro or QMacro contents.
- A problem appears only on one PC or profile and runtime mode, paths, logs or structured context need comparison.
When not to use it
- The visible run completed successfully or was intentionally stopped; diagnosis should report no clear error rather than invent one.
- You expect automatic repair. Diagnostics proposes checks but never edits commands, settings, files or browser profiles.
- No diagnostic data may leave the machine; stay with Medium and do not invoke Smart AI.
- You need a project backup, run outputs or every rotated log generation; a support ZIP is deliberately narrower.
Configuration steps
- Run the workflow until the real failure occurs. Note its time, mode, profile and triggering action, and preserve the log immediately afterwards.
- In Studio choose Tools › View log or More › View log. In QMacro Runner press View log to expand the inline details.
- Confirm that the final messages and latest structured context belong to this run. Studio retains up to 1,000 displayed text blocks; Runner can auto-expand details when Show log on error is enabled.
- Open AI Error Diagnosis and choose Medium - Free. This deterministic pass stays on the PC and needs no provider configuration.
- Review level, row, command, summary, reason, fixes, warnings, confidence, and displayed evidence. Category remains internal and is not rendered in the current result dialog. Studio can close the result and jump to the diagnosed row with Go to error row.
- If external analysis is justified, configure a provider and choose Use AI diagnosis or Smart (AI). The UI keeps Medium as fallback while waiting and provides Cancel.
- For a support case, use Export support log in Studio. In Runner, choose the visible Settings › Error diagnosis action; it exports ZIP rather than invoking Medium/Smart. A separately constructed Diagnostics button is not mounted in the current UI.
- Choose the ZIP destination. RunMacro appends the extension and reports the saved absolute path. Unreadable logs can produce manifest warnings, but an absent screenshot path or missing screenshot file can be omitted silently.
- Open the archive and inspect summary, environment, redacted settings, paths, manifest, every log and any screenshot. Remove further personal data before sending through a trusted channel.
Every option explained
Expected result
The read-only diagnosis dialog shows level, an identified row when available, command name/type, macro path, summary, reason, fixes, warnings, confidence, and evidence; category remains internal rather than rendered. Support export creates automacro-diagnostics-YYYYMMDD-HHMMSS.zip or the selected name with risk-reduced JSON and log tails, not a guarantee that secrets are absent. Studio may add an error report and screenshot; the Runner path adds neither.
Real example
Example: locate a selector failure in Studio without sending data externally
- Run until a Smart HTML action times out and leave the failed session evidence intact.
- Choose Tools › View log, verify the final lines belong to this attempt, then select AI Error Diagnosis › Medium - Free.
- Inspect detail, fallback counts, and nearby-command evidence; the engine prioritizes timeout signals before selector signals, but its internal category is not shown in the dialog.
- Press Go to error row so Studio closes the result, selects the command and highlights it; revise the wait condition or selector based on evidence.
- Run again. If support is still needed, export a ZIP and review logs, paths and redacted settings for remaining private data before sending.
Example: optional AI diagnosis and ZIP export from QMacro Runner
- After a profile fails, press View log; for a multi-profile run also open Results by profile to identify failed or skipped items.
- Start with Medium - Free and remember that Runner has no Go to row, Copy log or Clear log action.
- If Smart is warranted, open Settings › AI / API, configure a provider, then return and select Smart (AI) after reviewing the privacy boundary.
- For the support artifact, choose the visible Runner Settings › Error diagnosis action. Despite its label, that control saves ZIP rather than invoking AI.
- Inspect the archive for summary, environment, redacted settings, paths, manifest and logs, and confirm that Runner adds neither
error_report.jsonnor a screenshot.
Limitations and failure cases
- Classification is heuristic and ordered: timeout wins over CDP, followed by Label, selector, image, file, permission, exception and false. Mixed failures can therefore receive a broad category.
- The initial no-error gate is narrower than the detailed failure detector. A visible log containing only disconnect, could not, invalid or returned false wording can be reported as having no clear failure.
- Nothing is repaired automatically. Suggested fixes and confidence are investigation aids that must be checked against the actual command, environment and data.
- Smart sends an external provider a filtered local diagnosis, allowlisted error context, nearby command configurations, flow data, up to 8,000 log characters, command inventory, and runtime metadata. Filtered does not mean anonymous.
- Sections have local limits, but there is no global payload byte/token cap. Allowlisted error-context values can be unbounded, so payload size, cost, and privacy exposure may exceed expectations.
- The screenshot object is excluded from AI, yet derived Chrome/CDP evidence can still contain a port, tab, title or URL. The browser-state exclusion is not a promise that every browser-related string is absent.
- Structured key redaction and regex text filtering reduce risk rather than guaranteeing secret or PII removal. Emails, usernames, paths, URLs, titles, tracebacks, data rows, and free-form quoted JSON with keys such as
api_key,apikey, or session-like names can survive. - A Studio ZIP screenshot contains raw pixels with no blurring. Account names, email, balances, desktop content or page data may be visible.
- Runner export does not pass error context, so it cannot include
error_report.jsonor the captured screenshot. The Studio path is required for those artifacts. - Only the current tail of each log is included, capped at 512,000 bytes. Rotated backups, separate visible-widget text, macro files, arbitrary outputs and live browser contents are excluded.
- Studio Clear log affects only the visible widget, not persistent files or necessarily the last structured context. Starting or resetting another context can instead replace evidence you intended to preserve.
- Cancelling Smart cannot guarantee interruption of HTTP already running. Provider fallbacks are sequential while one UI timer covers the whole future, so background completion can outlive the displayed fallback.
- AI may fill the row when local analysis has not established one, and can revise summary, cause detail, fixes, confidence, or verification evidence. It cannot override an already-established runtime row.
Tips & common mistakes
api_key, apikey, or session-like keys can survive. Always inspect the ZIP, logs, and screenshot before sending.Verification details
core/log_diagnostics.pycore/diagnostics_export.pycore/error_context.pycore/logging_utils.pyui/main_window.pyui/qmacro_runner_window.pytests/test_log_diagnostics_context.pytests/test_logging_utils.py
RunMacro