iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To stop Avast from interrupting a trusted code file, add a narrowly scoped exception rather than disabling antivirus protection. The steps depend on whether you use Avast Antivirus or Avast Security on a Mac; Avast One has separate instructions.
Before adding an Avast exception
First confirm the product name shown in the app and the exact file or folder path that triggered the alert. Avast’s documented menus can vary by product and version, so do not assume an Avast Antivirus route applies to Avast One.
- Check that the file came from a source you trust and that its path matches the alert.
- If it is an unexpected executable, downloaded archive, unfamiliar dependency, or suspicious script, investigate it before allowing it to bypass scanning.
- If you cannot establish that the file is safe, Avast recommends scanning it with VirusTotal or submitting it to Avast Threat Labs rather than excluding it. Avast Support explains exclusions and safety precautions.
Add an exception in Avast Antivirus for Windows
- Open Avast Antivirus and select Menu > Settings > General > Exceptions.
- Choose Add exception.
- For a project file or folder, use the File/Folder tab, browse to the exact path, and add it.
- If needed, open the exception’s advanced options and choose which scan or protection categories it applies to. The documented categories include All scans, Behavior Shield detections, File Shield detections, Hardened Mode detections, and CyberCapture detections.
- Recheck the path and selected categories before saving. Test only the trusted file or narrowly scoped project output that caused the interruption.
Avast also documents a Command Line exception option. Use it only when the command-line item itself is the issue and you understand what the exception covers.
Choose the narrowest exception that works
A file or folder exception can exclude that item from scans and shields by default. Advanced options let you limit the exception to selected protections or scan categories. A broad project-directory exception may therefore cover more than a manually started scan.
#1 Best Overall
- THREAT DETECTION – Stay one step ahead. Suspicious links, risky sites, viruses, and scams, caught automatically before they reach you.
- PERSONAL INFO PROTECTION – Keep your personal info safer. Identity monitoring watches for your exposed info and tells you what to do about it.
- SECURE CONNECTIONS – Just a few easy clicks, and we'll automatically protect your info on public Wi‑Fi, every time you connect.
- GUIDED ACTION – Know what matters and what to do next. Clear alerts and simple guidance make it easy to take action.
- MORE THAN ANTIVIRUS – Scam protection, identity monitoring, VPN, web protection, and antivirus work together to protect you, all in one place.
| Exception choice | Effect and trade-off |
|---|---|
| Single file | Limits the exception to one path, making its scope easier to inspect and remove; newly generated files are not automatically covered. |
| Specific build or output folder | Can cover files repeatedly created in that location, but anything placed there may be excluded within the selected protection scope. |
| Broad project or development folder | Convenient when many files are involved, but may exempt unrelated or newly added content; avoid it unless that wider scope is intentional. |
| Selected scan or shield categories | Restricts which protections the exception affects, where the advanced options offer that choice. |
Prefer the smallest path and fewest excluded categories that resolve the specific interruption. Do not turn off all shields simply to make a build run.
Set exclusions in Avast Security for macOS
On Mac, scan exclusions and File Shield exclusions use separate settings routes:
Rank #2
- AWARD WINNING Antivirus, anti-malware, anti-spyware & more
- 24/7 REAL TIME PROTECTION against emerging malware threats, including ransomware and viruses- without slowing you down.
- PROTECTS YOUR DEVICES ON MULTIPLE PLATFORMS: Get cyber protection for your computers, smartphones, or tablets- Compatible with Windows, Mac, Android, iOS
- DOWNLOAD AND INSTALL INSTANTLY
- UNMATCHED THREAT DETECTION: We found malware on 40 percent of devices that already had a third-party antivirus installed.
- For a particular scan type: Open Avast Security > Preferences > Scans, choose the relevant scan, select Add exceptions, and choose the file, folder, or application.
- For File Shield: Open Avast Security > Preferences > Core Shields > File Shield > Add exceptions, then choose the item to exclude.
Web Guard exceptions are for websites or domains, not code files.
Free tools Windows power users keep installed
One-click scans. No signup required.
If you use Avast One
Avast One has separate exclusion instructions from Avast Antivirus. Confirm that the app is Avast One and follow its corresponding support guidance instead of using the Windows or Mac paths above. The available instructions do not establish one universal menu path across Avast One versions.
Rank #3
- SPEED-OPTIMIZED, CROSS-PLATFORM PROTECTION: World-class antivirus security and cyber protection for Windows (Windows 8, Windows 8.1, Windows 10, and Windows 11), Mac OS (macOS X Yosemite 10.10 or later), iOS (11.2 or later), and Android (5.0 or later). Organize and keep your digital life safe from hackers
- SAFE ONLINE BANKING: A unique, dedicated browser secures your online transactions; Our Total Security product also includes 200MB per day of our new and improved Bitdefender VPN
- ADVANCED THREAT DEFENSE: Real-Time Data Protection, Multi-Layer Malware and Ransomware Protection, Social Network Protection, Game/Movie/Work Modes, Microphone Monitor, Webcam Protection, Anti-Tracker, Phishing, Fraud, and Spam Protection, File Shredder, Parental Controls, and more
- ECO-FRIENDLY PACKAGING: Your product-specific code is printed on a card and shipped inside a protective cardboard sleeve. Simply open packaging and scratch off security ink on the card to reveal your activation code. No more bulky box or hard-to-recycle discs
Review or remove an exception
Keep exceptions limited to items you continue to trust. When a one-off build, test, or investigation is finished, return to the product’s exceptions settings, review the path and coverage, and remove the rule if it is no longer needed. If the alert returns for a different file, assess that file separately rather than expanding the existing exception automatically.
Quick Recap
Best Value
- THREAT DETECTION – Stay one step ahead. Suspicious links, risky sites, viruses, and scams, caught automatically before they reach you.
- PERSONAL INFO PROTECTION – Keep your personal info safer. Identity monitoring watches for your exposed info and tells you what to do about it.
- SECURE CONNECTIONS – Just a few clicks, and your info stays protected on public Wi-Fi every time you connect.
- PERSONAL DATA SCANS – Take your info off the market. We’ll find your personal information on sites selling it, then guide you on how to remove it.
- SOCIAL PRIVACY MANAGER – Decide what you share. McAfee finds the privacy settings buried in your social accounts and fixes them.
Rank #4
- THREAT DETECTION – Stay one step ahead. Suspicious links, risky sites, viruses, and scams, caught automatically before they reach you.
- PERSONAL INFO PROTECTION – Keep your personal info safer. Identity monitoring watches for your exposed info and tells you what to do about it.
- SECURE CONNECTIONS – Just a few easy clicks, and we'll automatically protect your info on public Wi‑Fi, every time you connect.
- GUIDED ACTION – Know what matters and what to do next. Clear alerts and simple guidance make it easy to take action.
- MORE THAN ANTIVIRUS – Scam protection, identity monitoring, VPN, web protection, and antivirus work together to protect you, all in one place.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

