为什么我的代码执行失序? [英] Why is my code executing out of order?

查看:77
本文介绍了为什么我的代码执行失序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用调试器逐行执行,使用F10跳过事物,但由于某种原因,我的代码执行乱序并且几乎以循环方式执行。  之前我从未遇到过调试器问题。我的视觉工作室肯定会改变

I was using the debugger to execute line by line using F10 to skip over things, but for some reason my code was executing out of order and almost in a looping fashion.  I have never really had a problem with the debugger before. Something has definitely changed on my visual studio.

问题最多的代码在这里:

The code with the most problems is here:


73    void op1(AdjMatrix& g,Integer& vertex,Text& textWord,VertexNameArray& vNames){
73    void op1(AdjMatrix& g, Integer& vertex, Text& textWord, VertexNameArray& vNames) {

推荐答案

>我正在使用调试器来使用F10逐行执行以跳过事物,但由于某种原因,我的代码执行乱序并且几乎以循环方式执行。我之前从未遇到过调试器问题。我的视觉工作室肯定改变了

>I was using the debugger to execute line by line using F10 to skip over things, but for some reason my code was executing out of order and almost in a looping fashion.  I have never really had a problem with the debugger before. Something has definitely changed on my visual studio.

您是否正在尝试调试发布(优化)版本?

这样的行为在调试时是正常的优化版。

Are you trying to debug a release (optimized) build?
Such behavior is normal when debugging an optimized version.

戴夫


这篇关于为什么我的代码执行失序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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