Stop Avast Scanning Your Code Without Turning Off Protection
In this article
Avast's real-time shields scan every file that is opened or executed, which can slow down coding workflows and trigger false positives on build artifacts. This guide shows you how to exclude your project folders, file types, and processes from scanning while keeping all Avast protection layers active. You'll need administrative access to your Windows account and, ideally, your project directory path ready.
What You'll Need
- Administrator rights on your Windows PC
- The full path to your code folder(s) (e.g., C:\Users\YourName\Projects)
- Knowledge of the file extensions you use (e.g., .js, .py, .cpp)
- Avast Antivirus (free or paid) installed and running
Step-by-Step
- Open Avast's interface. Double-click the Avast icon in the system tray (bottom-right of your taskbar). If you don't see it, click the up arrow to show hidden icons.
- Go to Settings. Click the gear icon in the top-right corner of the Avast window, or select "Settings" from the menu.
- Navigate to Exceptions. In the Settings menu, click "General" (or "Protection" depending on your version), then select "Exceptions" from the left sidebar. This is where you manage what Avast ignores.
- Add an exclusion for your code folder. Click "Add exception" (or the plus sign). In the popup, choose "Folder" and browse to your main project directory. Select the folder and confirm. Avast will now skip scanning everything inside that folder.
- Add file type exclusions (optional but recommended). Instead of excluding entire folders, you can exclude specific file types. Click "Add exception" again, choose "File mask" (or "File pattern"), and enter extensions like
*.js,*.py,*.ts,*.cpp,*.h, etc. Separate multiple patterns with a comma or add them one by one. This keeps scanning active for other file types. - Exclude build output folders. Common build directories like
node_modules,dist,build,.git, and__pycache__can be heavy and cause false positives. Add each as a folder exception, or use a wildcard pattern like*\node_modules\*if your projects are scattered. - Exclude your code editor or IDE process (if needed). Some editors trigger constant scans when they write temporary files. Go to "Exceptions" again, click "Add exception", choose "Program" (or "App"), and browse to your editor's .exe file (e.g., Code.exe for VS Code, devenv.exe for Visual Studio, idea64.exe for IntelliJ). This tells Avast to ignore all activity from that process.
- Apply and verify. Click "OK" or "Add" to save each exception. Avast will apply them immediately without restarting. To confirm, try running your code or building a project—it should feel noticeably faster.
Common Mistakes
- Excluding the wrong folder path. If you move your projects or use symlinks, the exclusion may not match. Always use absolute paths, not relative ones.
- Using too broad a file mask. Excluding
*.*would disable scanning for all files, which defeats the purpose. Be specific with extensions. - Forgetting to exclude subfolders. Some Avast versions only exclude the exact folder you pick, not its subfolders. If your build folder is nested deep, add the full path or use a wildcard pattern.
- Adding an exclusion for your entire C: drive. This is dangerous and will leave your system unprotected. Only exclude specific project directories.
- Not excluding the IDE process. Even with folder exclusions, the IDE's own file operations can still be scanned. Excluding the process helps a lot.
Tips
- Use wildcards for flexible paths. Patterns like
C:\Users\*\Projects\*can cover multiple users, but be careful—wildcards can accidentally exclude more than intended. - Keep exceptions minimal. Only exclude what you truly need. The more you exclude, the higher the risk of missing a real threat.
- Periodically review your exceptions. After updating Avast or changing your project structure, check that your exclusions still make sense.
- Use the "File Shield" sensitivity setting. If you don't want to exclude anything, you can lower the sensitivity from "High" to "Normal" in the Protection > Core Shields settings. This reduces scanning frequency without turning off protection.
- Test with a small project first. Before adding many exclusions, test with one folder to ensure the steps work as expected.
Troubleshooting
- Exclusions are not working. Make sure you clicked "Add exception" and not just "Edit". Also, check that the path is correct—copy-paste it from the folder properties. If using a file mask, ensure it's in the right format (e.g.,
*.jsnot.js). - Avast still scans my code. Some shields (like the Mail Shield or Web Shield) may still inspect files when they are sent over email or downloaded. For local code, ensure you've added both folder and file type exceptions. Also, restart your IDE or the Avast service from the tray icon.
- I can't find the Exceptions menu. In newer Avast versions, it's under "General" > "Exceptions". In older versions, it might be under "Protection" > "Core Shields" > "Exception list". If you can't find it, use the search bar in Settings.
- Avast is blocking a specific tool (like Git or a compiler). Add that program's executable to the "Program" exceptions. If you don't know the path, right-click the shortcut and select "Open file location".
- Performance is still slow. Try excluding the entire user profile folder for your IDE's cache (e.g.,
%APPDATA%\Code), but be cautious—this folder may contain downloaded extensions that could be malicious.
Frequently Asked Questions
Will excluding my code folder reduce my security?
Yes, slightly. Any file inside an excluded folder won't be scanned, so if you download a malicious file into that folder, Avast won't catch it. Keep exclusions limited to trusted project directories and avoid excluding downloads or system folders.
Can I exclude files by extension only, without a folder?
Yes, you can add a file mask like *.py to exclude all Python files system-wide. However, this is risky because a malicious Python script could then run undetected. It's safer to combine folder and extension exclusions.
Do I need to restart my PC after adding exceptions?
No, Avast applies exceptions immediately. However, if you have an IDE or other software running, you may need to restart that software for the changes to take full effect.
Will this stop Avast from detecting false positives in my build?
Yes, that's the main benefit. Excluding your build folder (like dist or node_modules) prevents Avast from flagging generated files that often look suspicious due to minification or packaging.
Can I exclude a network drive or a mapped drive?
Yes, you can add a UNC path (e.g., \server\share\projects) or a mapped drive letter (e.g., Z:\projects). Just ensure the drive is connected when you add the exception.
What if I use a different antivirus alongside Avast?
Running two antivirus programs is not recommended as they can conflict. If you have another AV, disable its real-time scanning for your code folders as well, or consider uninstalling one to avoid performance issues.