Which projects would I need to reference in the DXA .NET sourcecode to be able to step through it and debug an issue with RTF processing? It's an existing DXA 1.7 .Net project with a simple project structure.

The code to map to an image within an RTF field is failing, and I'd like to step through the code. I'm currently referencing the assembly but instead would like to load the sourcecode projects from DXA into the VS Solution, reference them, and be able to step through the code.

The DXA 1.7 Sources are here,but not sure which projects I would need to load into my solution and reference.

  • What kind of RTF image error did you run into? Are you perhaps using a webapp without the DXA core module, and the rendering of your entity view fails "A problem occurred while rendering this section" when the RTF field contains an image? – Jan H Sep 27 '17 at 9:31

It's not necessary to add the sources to your project, but you could use the *.pdb files. To get these pdb files, compile dxa from the sources in Github, and retrieve the pdb files from your bin folder.

Then, in your actual web application, you can specify a new folder containing your pdb files for the dxa sources in the debug options (for a full explaination, go here : https://msdn.microsoft.com/en-us/library/ms241613.aspx) : In visual studio, click the menu "debug" -> "options" -> "symbols", and there add a new directory containing those pdb files.

Then, you start debugging. To see if those symbol files loaded correctly, in debug mode open the window "debug" -> "window" -> "modules" and there you should see all dlls that are loaded, and if a corresponding .pdb file has loaded per dll.

Just make sure to build the correct source (you can't debug a dxa 1.6 project with pdb files built with a dxa 1.7.

Another tip: you can also add a breakpoint in a function within this pdb file. For this, you click "Debug", "New Breakpoint", "Break at Function", and then specify the full name of the function where you want to break "namespace.functionname(...)"

  • 3
    If you look in the download, the .PDBs are available in the web\dist\bin folder, saves you from having to build DXA from sources – Bart Koopman Sep 25 '17 at 11:09
  • 2
    Do note that the DLLs and PDB files which are part of the DXA distribution are built with Release Configuration (incl. associated compiler optimizations), so won’t give you the same debugging experience as when you build a Debug configuration yourself. – Rick Pannekoek Sep 25 '17 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.