无法设置下一条语句.下一条语句目前无法更改 [英] Unable to set the next statement. The next statement cannot be changed at this time

查看:1125
本文介绍了无法设置下一条语句.下一条语句目前无法更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在调试模式下移动黄色光标(下一条语句)时,我突然开始在Visual Studio 2015和2017中遇到此错误.

I suddenly started experiencing this error in Visual Studio 2015 and 2017, when trying to move the yellow cursor (next statement) in debugmode.

我要移动的代码没什么特别的(即不包括任何try-catch和/或异常语句),单步执行代码(F10,F11)可以正常工作.

The code I want to move over is nothing special (i.e does not include any try-catch and/or exception statements) and stepping through the code (F10, F11) works normally.

这是一个代码示例:

protected void Page_Load(object sender, EventArgs e)
{
        if (!IsPostBack)
        {
            ddlCountry.SelectedIndex = 0;
            ddlCountry.DataSource = new List<string>() {"Germany", "Japan"};
            ddlCountry.DataBind();
        }
}

该解决方案包含多个Web项目和控制台项目,但是在控制台项目中不会发生错误-仅在Web项目中不会发生.也就是说,在控制台项目中,我可以毫无问题地移动黄色光标.

The solution contains multiple web projects and console projects, but the error does not occur in the console projects - only in the web projects. I.e in the console projects, I can move the yellow cursor with no problems.

当我尝试在其他解决方案中执行相同操作时,我没有任何问题,因此这似乎与当前解决方案有关.

When I try to do the same in any other solution, I have no problems, so it seems to be something related to my current solution.

这些是我到目前为止尝试过的事情:

These are the things I tried so far:

  • 以管理员身份启动Visual Studio
  • 试图在vs2015和vs2017中移动黄色光标(相同的项目,相同的文件)-相同的结果
  • Visual Studio 2015修复安装
  • 使用以下命令"devenv.exe/resetuserdata"启动Visual Studio,以尝试重置所有用户数据
  • 工具->导入和导出设置->重置所有设置
  • 已删除.suo文件

我在Google上发现的所有建议都没有证明对解决此问题有很大帮助,因此,如果有人可以提供帮助,我将非常高兴.

All the suggestions I found on Google have not proved very helpful in solving this issue, so if anyone here can assist, I would be really glad.

推荐答案

取消选中此复选框(工具->选项)

Uncheck this (Tools --> Options)

这篇关于无法设置下一条语句.下一条语句目前无法更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆