I could send you my test project and see if that works on your machine.
For other people that want to try this out:
Check the path of your cocos install with ‘which cocos’, normally when running setup.py and use source … afterwards the path is changed, but I had to use source bash_profile as well before the path changes took effect.
Is VSCode right now ready to be used with 100% JavaScript projects created with Cocos Creator?
I’m using Cocos Creator 1.0 on Mac OS X and trying to setup VSCode to use it to debug my project, but for the moment I’m failing
Here is what is displayed in VSCode console: ar: attachRequest: address: localhost port: 7456 ar: attachRequest: connected ar: _termiated: Not a valid project.
Thanks for your help.
This mean that I can’t use VSCode to debug ‘directly’ a Cocos Creator project I’m currently editing, I need to build it first?
Right now, when I hit the ‘play’ or ‘refresh’ button, in Cocos Creator, I can view the result of my last changes in the default browser (Firefox), and even debug it if I need to.
I wanted to do the same within VSCode, because it seems the debugger included with VSCode is better than the one of Firefox, but if I need to build the project first, then it is not as interresting as I thought.
Debugger uses Firefox remote debugging protocol to communication between client(VSCode) and server(JSB program). There is not a protocol for log information. I will try to implement it if possible.
But, when Creator generates the JSB project it minifies all source javascript into a single file project.dev.js (for debug build). There is an option to generate source maps, but can I configure VS Code to use these sourcemaps?
What I want to be able to do is set a breakpoint in the source javascript in assets/Script instead of in the minified project.dev.js
Any ideas, or maybe this is something that is being worked on?
@pandemosth currently project.dev.js cannot be tear down to separated files in JSB, because we use node.js require to manage dependencies in Creator project, so we need browserify to package project scripts into project.dev.js. Keeping files apart will cause issues in JSB.
So when native debug is needed, what I do most often is to modify directly in project.dev.js, then apply to original scripts when solution found