5

I am trying to debug an issue with some code running at DesignTime in Expression Blend 2013.

I have a Windows Store (8.1) project that is loaded in Blend. I want to debug some ViewModel code that is running in the Blend designer.

In previous projects I have opened the same project in Visual Studio and done "Debug - Attach Process" to Blend.

The problem I am seeing on the current dev machine is that all the break points are invalid. They display the warning

The breakpoint will not currently be hit. No symbols have been loaded for this document

These breakpoints run fine if I simply Debug - Start in Visual Studio and deploy to the Emulator. Why is Blend not allowing me to attach and debug?

TIA

Pat Long

Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68

2 Answers2

5

I needed to debug a different process. Whereas in the past it have attached to Blend.exe for Windows Store Apps this would not work.

After using Proc Explorer from sysinternals I was able to search for my dlls. This showed that they were loaded by a process called xdesproc.exe.

The process was listed in Visual Studio's "Attach to Process" as x86 with no managed code. When I attached nothing much happended.

Then I changed the "Attach to:" settings from "Automatic" to explicitly say Debug these code types "Managed (v4.5, v4.0)".

Then it would debug. Hurrah!

Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68
1

Another possibility...

Make sure you have the "Enable/Disable Project Code" toggle set to "enabled"...in VS/Blend 2015 it's a small icon below the XAML editor:

as shown here.

If it's disabled, this could be the reason your design time instance doesn't seem to be working.

Further, if it's disabled and you attempt to debug using a second VS instance, then when you attach to the XDesProc any breakpoints you set in the code-behind will report that they "will not currently be hit. [because] No symbols have been loaded for this document". You might think that you need to somehow load the symbols, but if you open up the Modules window attempting to do so, you won't even see your module in the listing.

I lost a couple hours on this issue because of this setting being disabled. Hope this helps others not do the same. Because of that, I'll post this on a few of the related questions.

BTW, there's an excellent description of this debugging procedure by James McNellis on one of those related questions.

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81