Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to profile OpenTK C# application with CodeXL?

I wanted to switch from gDEBugger to CodeXL as CodeXL is the successor of gdeb and even has Visual Studio integration.

However, there are some problems with the integration for me. I'm using VS2013, the most recent CodeXL version and compile against .NET 4.5.

  • It starts the executable from the obj folder, not the bin folder. Thus, if I start CodeXL debugging, it doesn't find my engines DLL or any other stuff copied with the output, as these reside in the bin folder. I fixed this by manually copying the files there, but that's a rather dirty solution if you ask me.
  • I don't know how to log CodeXL redundant state changes with CodeXL, the thing I used gDEBugger mostly for. I can only start my project in the CodeXL "Debug Mode", but this one doesn't log redundant state changes. If I switch to the required "Analyze Mode", I don't get any statistics at all and can't even start the application, buttons and the statistics view are disabled.

Is someone successful using CodeXL with OpenTK and can tell me how to proceed? It boils down to the following two questions:

  • How to change the executable path to correct the obj <-> bin folder problem?
  • How to log redundant state changes of the OpenGL application?
like image 774
Ray Avatar asked Nov 11 '22 01:11

Ray


1 Answers

This is not a perfect solution but would ensure you have the latest files every time you build inside your "obj" folder, you could go into your project properties and under "Build Events" set your "Post-build event command Line:" to:

copy "$(SolutionDir)\YourProjectName\bin\Debug" "$(ProjectDir)\obj\Debug"

Assuming of course your active build is set to "Debug" and also replace your "YourProjectName" with your project name :-)

like image 169
Louie Bacaj Avatar answered Nov 14 '22 21:11

Louie Bacaj