0

I used to be able to see when there were binding errors at runtime or compile time in the output window. Now they're never there. I've seen things like this and tried all the answers, and nothing is showing in the intermediate window either.

Here's a simple test. I created a WPF app and just added a text box to the main window, then I set the binding on the Text property to a non-existent binding source blah:

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <TextBox HorizontalAlignment="Left" Height="23" 
            Margin="151,91,0,0" TextWrapping="Wrap" 
            Text="{Binding blah}" 
            VerticalAlignment="Top" Width="120"/>
    </Grid>
</Window>

I'm able to run the app just fine (which I know is typical because binding errors are usually swallowed, i.e. they don't result in an exception), but I thought the errors were supposed to be in the output window. Nothing.

What is going on?

Community
  • 1
  • 1
rory.ap
  • 34,009
  • 10
  • 83
  • 174
  • what have you selected at "show output from: " ? – vkluge Sep 23 '16 at 14:32
  • "Debug".......... – rory.ap Sep 23 '16 at 14:33
  • Can you try to enable extensive tracing for that specific binding with diag:PresentationTraceSources.TraceLevel="High" (diag beeing xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"). This is of course not a general solution. – vkluge Sep 23 '16 at 14:38
  • Ok, I did that, but still no output. – rory.ap Sep 23 '16 at 14:40
  • weird. Out of ideas here. If all the answers in the other question did not work for you the only thing i could think of would be reinstalling VS... – vkluge Sep 23 '16 at 14:42
  • Well thanks for your help anyway. – rory.ap Sep 23 '16 at 14:46
  • Sorry to be captain obvious, but I assume you rebooted your computer and restarted VS? – 15ee8f99-57ff-4f92-890c-b56153 Sep 23 '16 at 15:05
  • 1
    Restarted VS a number of times, and rebooted, yes. No help there. – rory.ap Sep 23 '16 at 15:09
  • I just fired up VS2013 and I too get nothing... If I use VS2015, the output is there. In VS2013, if I override OnStartup in app.xaml.cs and manually add a ConsoleTraceListener to System.Diagnostics.PresentationTraceSources then I get output. – J.H. Sep 23 '16 at 15:38
  • using System.Diagnostics; PresentationTraceSources.DataBindingSource.Listeners.Add(new ConsoleTraceListener()); PresentationTraceSources.DataBindingSource.Switch.Level = SourceLevels.All; – J.H. Sep 23 '16 at 15:38
  • Actually, just setting the switch level seems to show output. Adding the listener isn't even needed. – J.H. Sep 23 '16 at 17:19
  • 1
    I did just find something that seems to 'fix' it... Tools->Options->Debugging->General and checking "Use Managed Compatibility Mode". Make sure Debugging->Output Window has Data Binding set to All (or Information since that is what your binding error is logged as). – J.H. Sep 23 '16 at 17:35
  • Worked for me, too. Weird: [this MSDN blog](https://blogs.msdn.microsoft.com/visualstudioalm/2013/10/16/switching-to-managed-compatibility-mode-in-visual-studio-2013/) post says there are only two scenarios where I'd need to use this feature, and neither of them relate to this problem. I'm reluctant to keep that setting on because I don't want to lose the fancy new features that the legacy debugger prevents. – rory.ap Sep 23 '16 at 17:43
  • Yeah, that's why I didn't add it as an answer - more of a Band-Aid than a good answer/fix. It seems to be something with the switch level not being set since it does show if you manually set it in code at startup. Maybe try researching that? IDK... – J.H. Sep 23 '16 at 20:39
  • Strange thing is: I *know* I've seen the errors in the Output window before, and while using VS 2013. Something must have changed in my environment. – rory.ap Sep 23 '16 at 21:48

0 Answers0