Debugging Android Cocos2dx-3.0(rc2) with Visual Studio and Tegra Nsight 1.5

@brightlightapps For Visual Studio Android NDK Debugging could you please answer these three questions:
Thanks!

  1. Does visual studio work ok with adding and editing Java code and JAR files (Admob, Flurry, Google Analytics, etc) for Android, or does it only deal with C/C++?

  2. Does the VS solution build Java and C++ then package for device testing, or just C++ and require the JAR’s to already be present?

  3. How does the debugger respond to Java code build issues? Any similar runtime log messages to Logcat in Eclipse or other info about issues in the Java areas of the project?

I definitely want to try the VS solution, but I might wait until VS2015 is officially supported by cocos2d-x.
Although, I might not survive that long since Eclipse might give me a heart attack due to frustration before then.

  1. Yes to adding and editing Java code. JAR files - I haven’t added any APIs to my project as yet but will soon be integrating AppLovin.

  2. Java is built.

  3. Error is picked up by the javac compiler and reported in the VS IDE in the same way as a C++ error is typically displayed

Output window shows all the ANT build log:
1> -compile:
1> [javac] Compiling 2 source files to D:\DEV\GuessTheAnimal\proj.tegra\Tegra-Android\Debug\bin\classes
1> [javac] D:\DEV\GuessTheAnimal\proj.android\src\org\cocos2dx\cpp\AppActivity.java:33: error: cannot find symbol
1> [javac] private bool test;
1> [javac] ^
1> [javac] symbol: class bool
1> [javac] location: class AppActivity
1> [javac] 1 error

  1. Supports GDB Console & Android Logcat window

I gave this a try, the solution built and deployed to my Nexus 7 ok. But the Classes, cocos2d, Resources directories & contents are not showing in my project. How do I import those into my new project?

Cheers.

They don’t show up cause those folders are not underneath proj.android when you import the project. I just added the new tegra project to the existing win32 solution like the original poster suggested and I have access to all the files in the one solution, works for me - see below:

But if there are extra files you want to appear in the tegra project after you import, just right-click on the project, Add->New Filter, call the filter whatever you want, for eg.“Classes”, then right-click on the filter, go “Add Existing Files” and select all the C++ files. Although this isn’t practical for adding cocos2d cause you would need to create all the filters for the subdirectories - which is why adding the project to the existing win32 solution is the easier way and nothing in the solution view is duplicated.

Thanks! I will try that win32 way.

Does autocomplete work for you?
I added the Classes filter & the debugging is excellent.

Intellisense for C++ files imported directly into the tegra project doesn’t seem to work for “Make Application” tegra project types so best to just work with the C++ files in the win32 project.

Could you please make a video, I can’t make it work.

Where can i put breakpoint? because i put it in project win32 (HelloWold.cpp) nothing happen!

You should run visual studio as Administrator! It will work, but i don’t know where to put Breakpoint, in project android don’t have files cpp.