Nanfeng

Notes on software development, code, and curious ideas

Fix Cocos Creator VS Code “Could Not Read Source Map” Chrome Debug Error

Could Not Read Source Map Error

While debugging a Cocos Creator project in VS Code, I encountered the following error:

Could not read source map for chrome-error://chromewebdata/: Unexpected 503 response from chrome-error://chromewebdata/neterror, rollup.js.map: Unsupported protocol "chrome-error"

The browser could not load the game normally, although clicking the Preview button in Cocos Creator opened the browser and ran the project correctly.

Reset the Browser and Debug Session

In my case, restarting the computer resolved the problem. This usually points to a temporary browser, debugging-session, or local-service issue rather than a problem in the project itself. Before restarting, you can also try closing Chrome and VS Code completely, stopping any existing debug sessions, verifying the local preview service, and reopening the project.

If you know a more precise solution, feel free to share it in the comments.

+