Chrome Debugging: Fixing Crbug/1173575 Connection Issues
The Crbug/1173575: non-JS module files deprecated error in Chrome often appears when trying to debug web applications in Visual Studio Code. This misleading message typically indicates a connection issue rather than actual JavaScript module problems.
Common Causes and Solutions
1. Port Mismatch in Debug Configuration
The most frequent cause is a mismatch between your application's running port and your debug configuration.
Example Configuration Issue
Your Angular/React app might run on port 3000 while launch.json points to 8080:
// launch.json (incorrect)
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080", // Wrong port
"webRoot": "${workspaceFolder}"
}// launch.json (corrected)
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4200", // Match your app's port
"webRoot": "${workspaceFolder}"
}2. Server Not Running
The debugger requires your development server to be running before launching Chrome.
Important
Unlike some IDEs, Visual Studio Code's debugger doesn't automatically start your development server unless configured to do so.
Solution: Start your server manually first:
# For Angular
ng serve
# For React
npm start
# For Next.js
next dev3. Configure Automatic Server Startup
Add a tasks.json file to automate server startup before debugging:
// .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "start-server",
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": ".*",
"endsPattern": "Compiled|Failed to compile."
}
}
}
]
}Then update your launch.json:
{
"type": "pwa-chrome",
"request": "launch",
"name": "Debug Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"preLaunchTask": "start-server" // Added this line
}Framework-Specific Solutions
Angular Projects
Ensure your launch.json matches Angular's default port (4200):
{
"type": "pwa-chrome",
"request": "launch",
"name": "Angular Debug",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
}React/Next.js Applications
{
"type": "pwa-chrome",
"request": "launch",
"name": "React Debug",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}Blazor Applications
- Ensure button types are set to
type="button"instead oftype="submit" - Verify project references between
.Clientand.Serverprojects
Network and Browser Issues
Chrome Network Throttling Settings
Check Network Tab Settings
- Open Chrome Developer Tools (F12)
- Go to Network tab
- Ensure throttling is set to "No throttling" (not "Offline")
Browser Extensions
Some extensions (ad blockers, privacy tools) can interfere with localhost connections:
- Try incognito mode
- Disable extensions temporarily
- Whitelist localhost in your ad blocker
Clear Browser Cache
Cached files might cause conflicts:
- Open Chrome Developer Tools
- Right-click refresh button
- Select "Empty Cache and Hard Reload"
Advanced Troubleshooting
Hosts File Issues
Windows may overwrite your hosts file, removing localhost entries:
- Check
C:/Windows/System32/drivers/etc/hosts - Ensure it contains:
127.0.0.1 localhost - Save as administrator if changes are needed
VPN and Network Configuration
VPN connections can interfere with localhost access:
- Disconnect VPN temporarily
- Reset network settings (Windows: Settings → Network & Internet → Network reset)
MIME Type Issues
If using .mjs files, ensure proper MIME types and path references:
<!-- Incorrect -->
<script type="module" src="module.mjs"></script>
<!-- Correct -->
<script type="module" src="./module.mjs"></script>Visual Studio Code Configuration
Delete .vscode Folder
Corrupted debug configurations can cause this error:
- Close VS Code
- Delete the
.vscodefolder in your project - Restart VS Code and recreate launch configurations
Update Extensions
Ensure you're using the latest JavaScript debugger instead of deprecated Chrome debugger:
- Install "JavaScript Debugger" extension
- Remove any deprecated Chrome debugger extensions
When All Else Fails
Restart Everything
Sometimes a simple restart resolves the issue:
- Close all browser instances
- Stop all running servers
- Restart Visual Studio Code
- Restart your computer
Test in Different Browsers
Verify if the issue is Chrome-specific by testing in Firefox or Edge.
Prevention Best Practices
- Always match ports between your running application and debug configuration
- Use preLaunchTask in launch.json to automate server startup
- Regularly update VS Code and extensions
- Check network settings before debugging sessions
- Document your environment configuration for team consistency
Remember: The "Crbug/1173575" error is almost always a connectivity issue rather than a JavaScript module problem. Focus on ensuring your development server is properly running and accessible at the URL specified in your debug configuration.