Skip to content

Conversation

@nil1511
Copy link
Contributor

@nil1511 nil1511 commented May 20, 2016

Show line number and file name in console while logging cc.log

@nil1511
Copy link
Contributor Author

nil1511 commented May 21, 2016

@zilongshanren @pandamicro Please review this.

CCDebugger.js Outdated
return console.log.apply(console, arguments);
};
cc.error = Function.prototype.bind.call(console.error, console);
cc.assert = Function.prototype.bind.call(console.assert, console);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does console.assert supported on all major browsers ? including mobile browsers ?

@pandamicro
Copy link
Contributor

Thanks, it's indeed much more useful

@nil1511
Copy link
Contributor Author

nil1511 commented May 26, 2016

updated the pull request. If console.assert is not supported it will fallback to the old method

@pandamicro pandamicro merged commit 7ed8e7a into cocos2d:develop Jun 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants