Your app has entered a break state, but there is n

2019-01-26 02:48发布

Visual Studio 2017 breaks in debug mode and displays the message:

Your app has entered a break state, but there is no code to show because all threads were executing external code (typically system or framework code).

The message is in the Break Mode Window.

What to do?

13条回答
够拽才男人
2楼-- · 2019-01-26 03:27
  1. First check all your common exception setting run time in your visual studio so that you can get the actual error.

enter image description here

  1. During loading you application check that is their any method which is throw new NotImplementedException();

In my case i use INavigationAware which was throw new NotImplementedException(); i just remove those

  1. In you all project update all from nuget.

  2. Clean and rebuild you project.

查看更多
3楼-- · 2019-01-26 03:28

I got this situation when my "Platform Target" in my Project Properties was set to "Any CPU" and "Prefer 32-bit" was selected.

I switched Platform Target to "x64" since I am using 64-bit assemblies and then I could run/debug normally.

查看更多
一纸荒年 Trace。
4楼-- · 2019-01-26 03:30

Error: IOException Cannot locate resource

Most of the time this error occur when using visual studio form applications.

To solve this error you can go to your App.xaml file and edit SratupUri to your current xaml form name.

<Application x:Class="AppName.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
    </Application.Resources>
</Application>
查看更多
成全新的幸福
5楼-- · 2019-01-26 03:31

Click on "Continue execution"

enter image description here

Then you will have the stacktrace in the output tab

enter image description here

查看更多
放荡不羁爱自由
6楼-- · 2019-01-26 03:36

Check for any case of circular dependency while injecting dependencies.

查看更多
闹够了就滚
7楼-- · 2019-01-26 03:37

First drag the Break Mode Window to the Call Stack Window to get an overview again.

Then, check whether the Solution Explorer Window is in source mode. The 4th button from the left has a drop-down. Make sure the *.sln, i.e. classic solution mode is selected.

I didn't know this and was surprised to find that in "source mode", i.e. the other possibility, the above mentioned message is displayed.

查看更多
登录 后发表回答