2
votes

I'm trying to get remote debugging working to an AOS. But my breakpoints never get hit due to symbols not being loaded.

'Ax32Serv.exe' (CLR v4.0.30319: X++ IL App Domain): Loaded 'D:\Program Files\Microsoft Dynamics AX\60\Server\MyAOS\Bin\XppIL\Dynamics.Ax.Application.dll423.netmodule'. Cannot find or open the PDB file.

I have my debugging symbols setup to:

\server\d$\Program Files\Microsoft Dynamics AX\60\Server\MyAOS\bin\XppIL

But visual studio never loads the symbols into the cache.

  • I'm running Visual studio as Administrator
  • My client configuration settings are linked to the correct AOS
  • I'm connecting to the AOS with the AOS-account
  • I'm local administrator on the AOS server
  • Debugging options are checked on the server configuration

Any idea what I'm missing or not doing correctly?

Procmon is telling me that the devenv.exe process can't access below path (PATH_NOT_FOUND). But I'm clueless on why it's trying to access this path.

\server\d$\Program Files\Microsoft Dynamics AX\60\Server\MyAOS\bin\XppIL\Dynamics.Ax.Application.dll33.pdb\63A38861AB9B4E6EA55578A367A991AD1\Dynamics.Ax.Application.dll33.pdb

1
Did you restart the AOS to enable the debugging options? That is necessary. Also ideally you should install VS on the box itself and eliminate this remote debugging problem. What are you debugging X++ code or C# native code? Describe the problem and there may be better routes to understanding the root cause. - Keith Adler
Yes, the AOS has been restarted. We are trying to debug a AIF web service call. Installing visual studio on the AOS server is not an option. - Reinard
Don't use the administrative shares, like "d$". Setup your own so the debugger is allowed to use it. - Hans Passant

1 Answers

2
votes

According to my experience deployment of assemblies hinders a proper use of Remote Debugger at AOS side.

The following steps didn't help in my circumstances:

  • VS symbol cache set to a local path with PDB files (VS at a remote box caches a project from AOT).
  • VS symbol cache set to a shared folder (AOS PDB files are exposed to a network).
  • Attempts to find proper order of AOS restart / clean debug information in order to sync versions of loaded DLL and loaded PDB.
  • AOS option "Assembly hot-swap" didn't help either. It works, however PDB and DLL are not in sync.
  • Tinkering with DL3 / VSAssemblies AOS folders didn't reveal any workarounds.

Eventually it was found a possible way to overcome "Missing symbol information" message which is a root cause here in my opinion. There were a couple VS projects residing at AOT which were subject for remote debugging. Every attempt showed no luck due to the same "Missing symbol information" error.

I hope the following scenario could help OP to find a solution for AIF web service:

  1. Append CSPROJ manifest with the following lines:

    <VSProjectOutputFiles Include="$(OutputPath)$(AssemblyName).pdb">
         <Visible>true</Visible>
    </VSProjectOutputFiles>
    

    This helps to save PDB artifacts into AOT tree.

  2. Compile VS project at MorphX IDE. Compilation of project at AOT is essential here, as it deploys matching PDB alongside DLL.

  3. Restart AOS. Hot-swap didn't worked for PDB, so restart is mandatory here. As a result you can see proper PDB within "Modules" window at VS and breakpoints are reachable now thanks to that fact.

Although using Remote debugger looks truly appropriate for AOS (not to bloat server with dev tools), it seems there are still some kinks in relation to AOS code deployment.