Debugging JSB with Visual Studio Code

Hello, I followed the instructions laid out in here: Use VSCode to debug cocos2d-x JSB programs

I built, compiled, and ran the game with the platform set to “windows” in cocos creator (which, to my understanding, generates the JSB project). In VSCode, I’ve attached the debugger succesfully. Unfortunately, none of my break points show up as solid red on any file except the main.js. I’ve tried all the .js files in /src like project.dev.js.

Any advice on how to debug JSB with visual code? Thanks!

I think it is because the plugin is too old. You can clone this repo, and run ./release.sh to generate cocos-debug folder that contains the plugin. Then you can replace the plugin.

I also updated the cocos-debug zip file mentioned in Use VSCode to debug cocos2d-x JSB programs.

Thank you! I am running the JSB in visual studio community 2015 in debug mode and connected VSCode to it to debug the jscript. I set a break point in project.dev.js and it got hit. :smile: