# How to Debug PhysX in Unreal Engine 4.26+

**URL:** <https://forums.unrealengine.com/t/how-to-debug-physx-in-unreal-engine-4-26/487976>\
**Category:** World Creation\
**Tags:** Debugging, physx, unreal-engine, Engine-Source-Code, Physics, Visual-Studio, question\
**Created:** [August 25, 2021, 12:31pm UTC](https://forums.unrealengine.com/t/how-to-debug-physx-in-unreal-engine-4-26/487976 "2021-08-25T12:31:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![StaticJPL](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/staticjpl/32/705577_2.png) [@StaticJPL](https://forums.unrealengine.com/u/StaticJPL)\
**Post date:** [August 25, 2021, 12:31pm UTC](https://forums.unrealengine.com/t/how-to-debug-physx-in-unreal-engine-4-26/487976/1 "2021-08-25T12:31:33Z")

</div>

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.4 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.  
With the PhysX.sln you can compile it now.

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 to load for PhysX3 inside visual studio. I’ve compiled Physx for Debug, and Profile and have the required files.

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.
