Debugging Physx3.3 with Unreal Engine

Hello, I’ve got a question about debugging PhysX code with Unreal Engine Projects. I am currently learning how collision interfaces with the game Engine using PhysX on/off. I know the Unreal will be moving away from it at some point but I still think there is value in it.

I’ve spent a while trying to figure the process out and spoken with a few other developers that are interested in how they could customize collision detection/resolution or just learn how the interface works, particularly with the PhysX Visual Debugger (PVD) (Which I got working)

I was able to generate the PhysX3.3 project files by running the RunUAT.bat however, it was tricky as I had to make some modifications to files and download a later version of CMake.

I was able to do this as follows:

  1. Download the latest version of CMake (I used 3.19.0) and replace bin and share folder under ThirdPartyNotUE/Cmake.
  2. Go to BuildPhysx.Automation.cs and remove the line [Require P4]
  3. Under Target.Compiler for BuildPhysx_Win64 change BuildPhysX_WindowsCommon to VS2019
  4. Go to Build/Source/ThirdParty/PhysX3 and run the GenerateProjects_UAT.bat this just runs RunUAT.bat with the correct command parameters.
  5. With the PhysX.sln you can compile it now.
  6. The dll files and pdb files will be saved in Engine/Binaries/ThirdParty/PhysX3/Win64/VS2019

For example, I am setting break points inside PhysicsInterfacePhysX.cpp which make calls to the PhysX Code. I find I am unable to get the debug symbols for PhysX3PROFILE_X64 which is not generated when compiling PhysX3

Debug Symbols is not loaded “PhysX3Profile_x64”

Now I am not sure if there are any Engine code changes or C++ modifications that are needed.

If anyone knows a work around for this it would be very much appreciated as there are others besides myself interested on this process.