I'm trying to learn how to debug between Dynamics (AX 2012 R3) and Visual Studio. But for some reason I am unable to trigger any breakpoints in Visual Studio.
I've searched far and wide for more than a day and tried at least the following things (I've honestly lost track):
- Ensured I'm compiling as DEBUG
- Ensured DEBUG and TRACE constants are defined.
- Unchecked "Enable Just My Code"
- Unchecked "Require source files to exactly match the original version"
- Checked "Use Managed Compatibility Mode"
- Compiled, Cleaned, Rebuilt
- Deleted the dll from my user's AppData VSAssemblies folder
- Manually attached Visual Studio to AX32.exe
- Let Visual Studio open it's own AX32.exe instance on debugging
- Run Visual Studio with elevated permissions.
- Compiled the project in the AOT
- Not compiled the project in the AOT
- Removed and re-added the project to the AOT
My setup is like follows:
- Dynamics AX 2012 R3
- Visual Studio 2013
- Windows 10 client
- AOS on a server (not locally)
I don't know what more to try. What examples and solutions I find either don't have my problem or apply to other versions and reference settings I don't have. Or I tried them and it didn't help...
EDIT 1: I have been able to piece together a little more. Apparently the "deploy" function from Visual Studio does absolutely nothing. In order for my project (and dependent X++ code) to work I need to:
- Open AX client
- Compile the project there (this puts the DLL into the server folder)
- Restart the AX client (this puts the DLL into the client folder)
- Compile all dependent changes
If I then want to be able to debug it all I need to overwrite both locations with my locally compiled dll+pdb files.
This, to me does not seem like a good way to do things. What am I missing here?