本文介绍了断点不适用于Visual Studio 2013(已在调试模式下)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 尝试使用断点,但它会在按F11键后自动存在.在c ++中尝试相同的方法起作用,而不是每次都在c#中自动存在而无需逐步进入.我已经按照步骤进行操作: ---(干净的解决方案)---设置断点--- F11(每次都在调试模式下!!!)代码:使用系统;使用System.Collections.Generic;命名空间CSharpFundamentals{ 课程计划 { 公共静态void Main(string [] args) { var number = new List< int> {1,2,3,4,5,6}; //----在此处设置断点 var minimums = GetSmallests(numbers,3); < g class ="gr_ gr_349 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id ="349". id ="349" foreach/g. (< g class ="gr_ gr_350"中的变量号 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id ="350". id ="350">最小(/g)) Console.WriteLine(number); } 公共静态List< int> GetSmallests(List< int>列表,整数计数) { var minimums = new List< int>(); while(smallests.Count&count) { var min = GetSmallest(list); 最小.Add(min); list.Remove(min); } 返回最小值; } public static int GetSmallest(List< int> list) { //假设第一个数字是最小的 var min = list [0]; for(var i = 1; i< list.Count; i ++) { 如果(列表[i]>分钟) min = list [i]; } 返回最小值; } }} 解决方案 Trying to use breakpoint but it just auto-exist after hit F11.Try the same thing in c++ it work, not in c# every time just auto-exist withoutstep into.I already follow the steps: --- (clean solution) --- set breakpoint --- F11 (in the debug mode every time!!!)Code:using System;using System.Collections.Generic;namespace CSharpFundamentals{ class Program { public static void Main(string[] args) { var numbers = new List<int> { 1, 2, 3, 4, 5, 6 }; //----set breakpoint in here var smallests = GetSmallests(numbers, 3); <g class="gr_ gr_349 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="349" id="349">foreach</g> (var number in <g class="gr_ gr_350 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="350" id="350">smallests</g>) Console.WriteLine(number); } public static List<int> GetSmallests(List<int> list, int count) { var smallests = new List<int>(); while (smallests.Count < count) { var min = GetSmallest(list); smallests.Add(min); list.Remove(min); } return smallests; } public static int GetSmallest(List<int> list) { // Assume the first number is the smallest var min = list[0]; for (var i = 1; i < list.Count; i++) { if (list[i] > min) min = list[i]; } return min; } }} 解决方案 这篇关于断点不适用于Visual Studio 2013(已在调试模式下)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!