"Remarks" I am currently using the latest version of Cocos Creator 1.8.1 (support for small game development).
The latest version Cocos Creator 1.8.1 in the MAC environment does not yet support the built-in browser Safari for JS code debugging, only install using Chrome and debugger for Chrome.
From Cocos Creator 1.4.0-beta.2 the workflow of using the VS Code Debug Web version of the game has been added. To do this, we need to install the Debugger for Chrome plugin in VS Code and add the Chrome Debug configuration from the Vscode workflow in the Creator main menu.
Here's an introduction to installing VS Code (Microsoft provides a visual development tool for open source lightweight popular language, which is worth recommending). The steps to install the debugger for Chrome plugin in VS code are:
"Prerequisites" Installs the latest version of the Chrome browser for Mac version.
1, open vs Code;
2. Click the Menu "Debug"-"Install other debugger ...";
3, enter the search keyword "Chrome", as shown:
4, click the "Install" button to install the plugin "Debugger for Chrome 4.1.0".
Finally, run the Cocos Creator main Menu:
Add Chrome Debug Configuration to the developer-vscode Workflow.
Here it is. You can set breakpoints for JS code in VS Code and start debugging JS code directly in VS code.
?
Mac environment Cocos Creator Debug JS code necessary settings