C# App.XAML.CS中的断点不工作
每当我在WPF App.XAML.cs文件中放置断点时,断点都不会命中。就好像根本没有执行文件一样。真奇怪。。。。不存在通常的“黄色断点”,指示未命中断点。它只是运行程序,就好像根本没有执行文件一样 有人知道为什么吗 这是我的App.Xaml.cs代码C# App.XAML.CS中的断点不工作,c#,.net,wpf,visual-studio,xaml,C#,.net,Wpf,Visual Studio,Xaml,每当我在WPF App.XAML.cs文件中放置断点时,断点都不会命中。就好像根本没有执行文件一样。真奇怪。。。。不存在通常的“黄色断点”,指示未命中断点。它只是运行程序,就好像根本没有执行文件一样 有人知道为什么吗 这是我的App.Xaml.cs代码 using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Linq; using Sys
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using Abt.Controls.SciChart;
using Abt.Controls.SciChart.Model.DataSeries;
using Abt.Controls.SciChart.Utility;
using Abt.Controls.SciChart.Visuals;
using Abt.Controls.SciChart.Visuals.Axes;
using Abt.Controls.SciChart.Visuals.Annotations;
using Abt.Controls.SciChart.Visuals.RenderableSeries;
using Abt.Controls.SciChart.ChartModifiers;
using Abt.Controls.SciChart.Numerics.CoordinateCalculators;
namespace Hub
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public App()
{
CUtilities.WCFCalls = new List<string>();
}
}
}
使用系统;
使用System.Collections.Generic;
使用系统配置;
使用系统数据;
使用System.Linq;
使用System.Threading.Tasks;
使用System.Windows;
使用Abt.Controls.SciChart;
使用Abt.Controls.SciChart.Model.DataSeries;
使用Abt.Controls.SciChart.Utility;
使用Abt.Controls.SciChart.Visuals;
使用Abt.Controls.SciChart.Visuals.Axes;
使用Abt.Controls.SciChart.Visuals.annotation;
使用Abt.Controls.SciChart.Visuals.RenderableSeries;
使用Abt.Controls.SciChart.ChartModifiers;
使用Abt.Controls.SciChart.Numerics.CoordinateCalculators;
命名空间中心
{
///
///App.xaml的交互逻辑
///
公共部分类应用程序:应用程序
{
公共应用程序()
{
CUtilities.wcfcall=新列表();
}
}
}
这是我的app.g.cs文件
#pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "788CF6544127ABDC6D6160DE3D084FC8"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace Client {
/// <summary>
/// App
/// </summary>
public partial class App : System.Windows.Application {
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
#line 4 "..\..\App.xaml"
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
#line default
#line hidden
System.Uri resourceLocater = new System.Uri("/Client;component/app.xaml", System.UriKind.Relative);
#line 1 "..\..\App.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
/// <summary>
/// Application Entry Point.
/// </summary>
[System.STAThreadAttribute()]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public static void Main() {
Client.App app = new Client.App();
app.InitializeComponent();
app.Run();
}
}
}
#pragma校验和“.\..\App.xaml”“{406ea660-64cf-4c82-b6f0-42D4817A799}”“788CF6544127ABDC6160DE3D084FC8”
//------------------------------------------------------------------------------
//
//这段代码是由一个工具生成的。
//运行时版本:4.0.30319.18444
//
//对此文件的更改可能会导致不正确的行为,如果
//重新生成代码。
//
//------------------------------------------------------------------------------
使用制度;
使用系统诊断;
使用System.Windows;
使用System.Windows.Automation;
使用System.Windows.Controls;
使用System.Windows.Controls.Primitives;
使用System.Windows.Data;
使用System.Windows.Documents;
使用System.Windows.Ink;
使用System.Windows.Input;
使用System.Windows.Markup;
使用System.Windows.Media;
使用System.Windows.Media.Animation;
使用System.Windows.Media.Effects;
使用System.Windows.Media.Imaging;
使用System.Windows.Media.Media3D;
使用System.Windows.Media.TextFormatting;
使用System.Windows.Navigation;
使用System.Windows.Shapes;
使用System.Windows.Shell;
命名空间客户端{
///
///应用程序
///
公共部分类应用程序:System.Windows.Application{
私有bool_内容加载;
///
///初始化组件
///
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute(“PresentationBuildTasks”,“4.0.0.0”)]
public void InitializeComponent(){
如果(_contentLoaded){
返回;
}
_contentLoaded=true;
#第4行“.\..\App.xaml”
this.StartupUri=new System.Uri(“MainWindow.xaml”,System.UriKind.Relative);
#行默认值
#隐藏线
System.uriresourcelocater=new System.Uri(“/Client;component/app.xaml”,System.UriKind.Relative);
#第1行“.\..\App.xaml”
System.Windows.Application.LoadComponent(这是resourceLocater);
#行默认值
#隐藏线
}
///
///应用程序入口点。
///
[System.STAThreadAttribute()]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute(“PresentationBuildTasks”,“4.0.0.0”)]
公共静态void Main(){
Client.App App=new Client.App();
app.InitializeComponent();
app.Run();
}
}
}
我似乎记得在较旧版本的Visual Studio中发生过这种情况,好像调试器需要一两秒钟才能连接到进程或其他东西。我发现我可以用Debugger.Break()手动强制它代码>在任何情况下,请尝试手动删除bin/obj文件夹并进行重建,有时这也是增量编译本身混乱的结果。我似乎记得在较旧版本的Visual Studio中发生过这种情况,好像调试器需要一两秒钟才能连接到进程或其他东西。我发现我可以用Debugger.Break()手动强制它代码>在任何情况下,尝试手动删除bin/obj文件夹并进行重建,有时这也是增量编译本身混乱的结果