debugginggraphicsrenderdoc

How to programatically launch and attach to RenderDoc?


RenderDoc has an in-application API that can be used to programatically start and end captures. If I understand the documentation correctly, my application needs to have been opened from within RenderDoc for the relevant library to be available to be dynamically loaded.

I want to be able to programatically launch RenderDoc from within my C++/Win32 application and attach my application to it so I can start and end a frame capture.

How can I achieve this?


Solution

  • The typical workflow would be to launch your application through the RenderDoc UI, check if the module (dll/so) is loaded, and use the in-application API if it is available, but this is not strictly necessary. You should be able to just preload the relevant module, verify it is open in your app in the same way, and use the API that way without going through the UI.