VS2013怎么F11有时无法step into

fengchang 2014-03-28 01:48:43
对于VS2103是新手,怎么f11有时无法进入函数实现体里面去?
比如
int k{};
cout << k << endl;
想看看cout<<k就无法进入?
...全文
313 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2014-04-01
  • 打赏
  • 举报
回复
计算机组成原理→DOS命令→汇编语言→C语言(不包括C++)、代码书写规范→数据结构、编译原理、操作系统→计算机网络、数据库原理、正则表达式→其它语言(包括C++)、架构…… 对学习编程者的忠告: 眼过千遍不如手过一遍! 书看千行不如手敲一行! 手敲千行不如单步一行! 单步源代码千行不如单步对应汇编一行! 单步类的实例“构造”或“复制”或“作为函数参数”或“作为函数返回值返回”或“参加各种运算”或“退出作用域”的语句对应的汇编代码几步后,就会来到该类的“构造函数”或“复制构造函数”或“运算符重载”或“析构函数”对应的C/C++源代码处。 VC调试时按Alt+8、Alt+7、Alt+6和Alt+5,打开汇编窗口、堆栈窗口、内存窗口和寄存器窗口看每句C对应的汇编、单步执行并观察相应堆栈、内存和寄存器变化,这样过一遍不就啥都明白了吗。 对VC来说,所谓‘调试时’就是编译连接通过以后,按F10或F11键单步执行一步以后的时候,或者在某行按F9设了断点后按F5执行停在该断点处的时候。 (Turbo C或Borland C用Turbo Debugger调试,Linux或Unix下用GDB调试时,看每句C对应的汇编并单步执行观察相应内存和寄存器变化。)
fengchang 2014-03-29
  • 打赏
  • 举报
回复
引用 3 楼 JiMoKuangXiangQu 的回复:
[quote=引用 2 楼 fengchang 的回复:] [quote=引用 1 楼 JiMoKuangXiangQu 的回复:] 用什么电脑安装的?笔记本还是台式机? 有些笔记本的F11有特殊功能,在这种情况下,先要关闭这些特殊功能。
FN键功能是正常的; string s = "dfdfd"; cout <<s;是可以跟踪进去的。[/quote] 既然 string s = "dfdfd"; cout <<s; 可以跟进去,按理来说应该vs的f11功能是正常的。可能是一些dead code(永远无法被执行到的代码)。 可以尝试最简单的代码:
#include <iostream>
using namespace std;

int main()
{
    int  k/*{}*/;
    cout << k << endl;
    return 0;
}
在语句: cout << k << endl; 处设置断点,看能否跟进去。[/quote] 就是在cout处设置断点的。
zhuobattle 2014-03-28
  • 打赏
  • 举报
回复
调试时,右键->汇编模式,这样什么函数都能进去了,可能是某些函数没有C/C++代码的,F11进不去,但是汇编是可以完全进行任何函数的。
JiMoKuangXiangQu 2014-03-28
  • 打赏
  • 举报
回复
引用 2 楼 fengchang 的回复:
[quote=引用 1 楼 JiMoKuangXiangQu 的回复:] 用什么电脑安装的?笔记本还是台式机? 有些笔记本的F11有特殊功能,在这种情况下,先要关闭这些特殊功能。
FN键功能是正常的; string s = "dfdfd"; cout <<s;是可以跟踪进去的。[/quote] 既然 string s = "dfdfd"; cout <<s; 可以跟进去,按理来说应该vs的f11功能是正常的。可能是一些dead code(永远无法被执行到的代码)。 可以尝试最简单的代码:
#include <iostream>
using namespace std;

int main()
{
    int  k/*{}*/;
    cout << k << endl;
    return 0;
}
在语句: cout << k << endl; 处设置断点,看能否跟进去。
fengchang 2014-03-28
  • 打赏
  • 举报
回复
引用 1 楼 JiMoKuangXiangQu 的回复:
用什么电脑安装的?笔记本还是台式机? 有些笔记本的F11有特殊功能,在这种情况下,先要关闭这些特殊功能。
FN键功能是正常的; string s = "dfdfd"; cout <<s;是可以跟踪进去的。
JiMoKuangXiangQu 2014-03-28
  • 打赏
  • 举报
回复
用什么电脑安装的?笔记本还是台式机? 有些笔记本的F11有特殊功能,在这种情况下,先要关闭这些特殊功能。
C++上机实验报告-实验三全文共13页,当前为第1页。C++上机实验报告-实验三全文共13页,当前为第1页。实验三类与对象 C++上机实验报告-实验三全文共13页,当前为第1页。 C++上机实验报告-实验三全文共13页,当前为第1页。 实验目的 1.掌握类的定义和使用 2.掌握类的定义和对象的声明 3.复习具有不同访问属性的成员的访问方式 4.观察构造函数和析构函数的执行过程 5.学习类的组合使用方法 6.使用VC++的debug调试功能观察程序流程,跟踪观察类的构造函数、析构函数、成员函数的执行顺序。 2.实验要求 1.定义一个CPU类,包含等级(rank)、频率(frequency)、电压(voltage)等属性,有两个公有成员函数run、stop。其中,rank为枚举类型CPU_Rank,定义为enum CPU_Rank{P1=1,P2,P3,P4,P5,P6,P7},frequency为单位是MHz的整型数,voltage为浮点型的电压值。观察构造函数和析构函数的调用顺序。 2.定义一个简单的Computer类,有数据成员芯片(cpu)、内存(ram)、光驱(cdrom)等等,有两个公有成员函数run、stop。cpu为CPU类的一个对象,ram为RAM类的一个对象,cdrom为CDROM类的一个对象,定义并实现这个类。 3. (选做)设计一个用于人事管理的People(人员)类。考虑到通用性这里只抽象出所有类型人员都具有的属性:number(编号)、sex(性别)、birthday(出生日期)、id(身份证号)等等。其中"出生日期"定义为一个"日期"类内嵌子对象。用成员函数实现对人员信息的录入和显示。要求包括:构造函数和析构函数、拷贝构造函数、内联成员函数、组合。 3.实验内容 1.首先定义枚举类型CPU_Rank,例如enum CPU_Rank{P1=1, P2, P3, P4, P5, P6, P7},再定义CPU类,包含等级(rank)、频率(frequency)、电压(voltage)等私有数据成员,定义成员函数run、stop,用来输出提示信息,在构造函数和析构函数中也可以输出提示信息。在主程序中定义一个CPU的对象,调用其成员函数,观察类对象的构造与析构顺序,以及成员函数的调用。程序名:lab4_1.cpp 2.使用debug调试功能观察程序lab4_1.cpp的运行流程,跟踪观察类的构造函数、析构函数、成员函数的执行顺序。 3.调试操作步骤如下: 1)单击Build " Start Debug " Step Into命令,或按下快捷键F11,系统进入单步执行状态,程序开始运行,一个DOS窗口出现,此时Visual Studio 中光标停在main()函数的入口处; 2)从Debug菜单或Debug工具栏中单击Step Over,此时,光标下移,程序准备执行CPU对象的初始化; 3)单击Step Into,程序准备执行CPU类的构造函数; 4)连续单击Step Over,观察构造函数; C++上机实验报告-实验三全文共13页,当前为第2页。C++上机实验报告-实验三全文共13页,当前为第2页。5)此时程序准备执行CPU对象的run()函数,单击Step Into,程序进入run()成员函数,连续单击Step Over,直到回到main()函数。 C++上机实验报告-实验三全文共13页,当前为第2页。 C++上机实验报告-实验三全文共13页,当前为第2页。 6)继续执行程序,参照上述的方法,观察程序的执行顺序,加深对类的构造函数、析构函数、成员函数的执行顺序的认识。 7)再试试Debug菜单栏中别的菜单项,熟悉Debug的各种方法。 4.首先定义CPU类(可使用第二题中的CPU类)、RAM类、CDROM类。再定义Computer类;定义私有数据成员cpu、ram、cdrom,定义公有成员函数run、stop,可在其中输出提示信息。在主程序中定义一个Computer的对象,调用其成员函数,观察类对象及其成员变量的构造与析构顺序,以及成员函数的调用。程序名:lab4_2.cpp. 使用debug调试功能观察lab4_2.cpp程序的运行流程,跟踪观察类的构造函数、析构函数、成员函数的执行顺序,特别注意观察成员变量的构造与析构顺序。 4.思考题: 1.如何定义一个类? class 类名称 { public: 外部接口 protected: 保护型成员 private: 私有成员 }; 2.如何定义类的构造函数和析构函数? class 类名称 { public: 类名(形参表);//构造函数声明 类名(类名& 对象名);//拷贝构造函数声明 ~类名();//析构函数声明 …… }; 类名::类名(形参表)//构造
有关类与对象的程序算法设计:1.试分析以下程序的运行结果并上机验证. #include class Sample {    int x; public:    Sample(){}    Sample(int a){x=a;}    Sample(Sample &a){x=a.x+++10;}    void disp(char *ob)    { cout< class Son {  int age; public: Son(){ age=1;} Son(int i){age=i;} void print(){ cout<<"儿子的年龄是:"<   class score{   float english_score;   public:   score(float t){english_score=t;} void printscore(){cout<<”english_score=”<Step Into命令,或按下快捷键F11,系统进入单步执行状态,程序开始运行,一个DOS窗口出现,此时Visual Studio中光标停在main()函数的入口处; 从Debug菜单或Debug工具栏中单击Step Over,此时,光标下移,程序准备执行score对象的初始化; 单击Step Into,程序准备执行score类的构造函数; 连续单击Step Over,观察构造函数的执行情况,直到执行完构造函数,程序回到主函数; 此时程序准备执行stu1对象的printscore()函数,单击Step Into,程序进入printscore()成员函数,连续单击Step Over,直到回到main()函数; 连续执行程序,参照上述方法,观察程序的执行顺序,加深对类的构造函数、析构函数、成员函数的执行顺序的认识; 在试试Debug菜单栏中别的菜单中别的菜单项,熟悉Debug各种方法。 【实验仪器与软件平台】 计算机 Windows2000 Visual C++6.0 【实验预备知识】 计算机文化基础 【实验结果】 1.程序: #include class Sample { int x; public: Sample(){} Sample(int a){x=a;} Sample(Sample &a){x=a.x+++10;} void disp(char *ob) { cout< class Son { int age; public: Son(){ age=1;} Son(int i){age=i;} void print(){ cout<<"儿子的年龄是:"< class score{ float english_score; public: score(float t){english_score=t;} void printscore(){cout<<"english_score="<
Codelobster PHP Edition streamlines and simplifies php development process. You don't need to keep in mind names of functions, arguments, tags and their attributes; methods etc - we've implemented it for you in the autocomplete feature for PHP, HTML, JavaScript and even CSS. Also, you can always get necessary help information by F1 or using special Help control. Internal free PHP Debugger allows validating code locally. It automatically detects your current server settings and configures corresponding files in order you can use the Debugger. Our goal is to create product which would simplify and speed up to the maximum process of developing full-featured web sites on php. For now, it includes all standard abilities for operating with code and many advanced features for PHP developing. The full list of all features of Free PHP IDE: • PHP, HTML, JavaScript, CSS code highlighting • PHP, HTML, JavaScript, CSS code collapsing • HTML autocomplete Autocomplete of tags, attributes for current tag, closing tags. • HTML code inspector Inspector makes it simple to find HTML elements buried deep in the page. • CSS autocomplete Autocomplete of style property names and values. JavaScript Advanced autocomplete Autocomplete of keywords, DOM elements and their properties. • PHP Advanced autocomplete This feature speeds up writing a code. Autocomplete includes wide selection of code completion listings. Lists are formed of both standard PHP and user's classes, variables, functions, constants and keywords. Starting typing new element, lists of all possible variants for its completion are being displaying after $this-> and ClassName:: • PHP Debugger The Debugger is a package of tools that allows a developer debugging applications during developing process. Before running, you need to configure it. Set necessary values for the following options in Preferences menu (Tools-->Preferences-->Debugger): Virtual folder - path to a virtual project folder Virtual host URL - url of a virtual folder Path to php.ini - path to the php.ini file Server - Apache version running on your computer. You need to select from the list, which displays all Apache versions installed on your machine. Features for debugger: Functions Step Into (F11), Step Over (F10), Stop Debug (Shift+F5) Watch window in debugger, displaying only user's variables Local variables window and Call stack windows Expand of objects $this-> while debugging SQL Autocomplete Autocomplete of database objects (tables, fields) and SQL structures. Context and Dynamic Help with search for work with PHP, MySQL, HTML DynamicHelp window automatically lists all possible references for current word. You also can use ContextHelp to get information about shortcut keys. Code folding (collapsing) Pair highlighting Highlighting of paired tags and attributes. Pair selection, tags and attributes selection commands Selects content within current block. Tooltip: The tooltip enables to view values of variables marked with a mouse cursor. Class View (View-->Window-->Class View) contains code elements (classes, functions and variables) of all opened files and of a whole application. You can easily navigate through your project and find all declarations for chosen element within it. In case of ambiguity solution dialogue appears. Preview in a browser Project manager The project is connected with a folder on the disc. And its structure remains the same when transfers. Also there is an ability to search project's symbols and files using shortcut keys. Incremental find All standard functionalities for work with a code Drupal plug-in available Smarty plug-in available WordPress plug-in available Joomla plug-in available New version has the following new abilities: Speed up for code editing Option for Shift+Backspace Storing collapsing state Bugs fixed: Dialog for Hot Keys in the Preferences Crash on exit in 64-bit Win7 Bug with collapsing in word-wrap mode Navigation in the Project Tree by keys bug with CakePhp MVC directories crash on Locals Window some crashes while code editing some crashes on close files problem with same file names by SFTP some incorrect highlighting for Starty templates Codelobster PHP Edition Version 4.0.1 released! New version has the following new abilities: PHP/HTML/CSS code validator Autodetect for 64-bit version of the Debugger New modules for Drupal 7 TODO for javascript Ability to change style of windows Beautifying of tree controls Bugs fixed: FTP crash Indent guides for mixed code Resize for status bar Autodetect for Yii database CSS breakdown in File Window Changes in French translation Joomla database connection Joomla syntax errors "go to" structure in the PHP code validator
Codelobster PHP Edition streamlines and simplifies php development process. You don't need to keep in mind names of functions, arguments, tags and their attributes; methods etc - we've implemented it for you in the autocomplete feature for PHP, HTML, JavaScript and even CSS. Also, you can always get necessary help information by F1 or using special Help control. Internal free PHP Debugger allows validating code locally. It automatically detects your current server settings and configures corresponding files in order you can use the Debugger. Our goal is to create product which would simplify and speed up to the maximum process of developing full-featured web sites on php. For now, it includes all standard abilities for operating with code and many advanced features for PHP developing. The full list of all features of Free PHP IDE: • PHP, HTML, JavaScript, CSS code highlighting • PHP, HTML, JavaScript, CSS code collapsing • HTML autocomplete Autocomplete of tags, attributes for current tag, closing tags. • HTML code inspector Inspector makes it simple to find HTML elements buried deep in the page. • CSS autocomplete Autocomplete of style property names and values. JavaScript Advanced autocomplete Autocomplete of keywords, DOM elements and their properties. • PHP Advanced autocomplete This feature speeds up writing a code. Autocomplete includes wide selection of code completion listings. Lists are formed of both standard PHP and user's classes, variables, functions, constants and keywords. Starting typing new element, lists of all possible variants for its completion are being displaying after $this-> and ClassName:: • PHP Debugger The Debugger is a package of tools that allows a developer debugging applications during developing process. Before running, you need to configure it. Set necessary values for the following options in Preferences menu (Tools-->Preferences-->Debugger): Virtual folder - path to a virtual project folder Virtual host URL - url of a virtual folder Path to php.ini - path to the php.ini file Server - Apache version running on your computer. You need to select from the list, which displays all Apache versions installed on your machine. Features for debugger: Functions Step Into (F11), Step Over (F10), Stop Debug (Shift+F5) Watch window in debugger, displaying only user's variables Local variables window and Call stack windows Expand of objects $this-> while debugging SQL Autocomplete Autocomplete of database objects (tables, fields) and SQL structures. Context and Dynamic Help with search for work with PHP, MySQL, HTML DynamicHelp window automatically lists all possible references for current word. You also can use ContextHelp to get information about shortcut keys. Code folding (collapsing) Pair highlighting Highlighting of paired tags and attributes. Pair selection, tags and attributes selection commands Selects content within current block. Tooltip: The tooltip enables to view values of variables marked with a mouse cursor. Class View (View-->Window-->Class View) contains code elements (classes, functions and variables) of all opened files and of a whole application. You can easily navigate through your project and find all declarations for chosen element within it. In case of ambiguity solution dialogue appears. Preview in a browser Project manager The project is connected with a folder on the disc. And its structure remains the same when transfers. Also there is an ability to search project's symbols and files using shortcut keys. Incremental find All standard functionalities for work with a code Drupal plug-in available Smarty plug-in available WordPress plug-in available Joomla plug-in available New version has the following new abilities: Speed up for code editing Option for Shift+Backspace Storing collapsing state Bugs fixed: Dialog for Hot Keys in the Preferences Crash on exit in 64-bit Win7 Bug with collapsing in word-wrap mode Navigation in the Project Tree by keys bug with CakePhp MVC directories crash on Locals Window some crashes while code editing some crashes on close files problem with same file names by SFTP some incorrect highlighting for Starty templates Codelobster PHP Edition Version 4.0.1 released! New version has the following new abilities: PHP/HTML/CSS code validator Autodetect for 64-bit version of the Debugger New modules for Drupal 7 TODO for javascript Ability to change style of windows Beautifying of tree controls Bugs fixed: FTP crash Indent guides for mixed code Resize for status bar Autodetect for Yii database CSS breakdown in File Window Changes in French translation Joomla database connection Joomla syntax errors "go to" structure in the PHP code validator
PL/SQL Developer是一个集成开发环境,专门面向Oracle数据库存储程序单元的开发。如今,有越来越多的商业逻辑和应用逻辑转向了Oracle Server,因此,PL/SQL编程也成了整个开发过程的一个重要组成部分。PL/SQL Developer侧重于易用性、代码品质和生产力,充分发挥Oracle应用程序开发过程中的主要优势。 主要特性    登录界面PL/SQL编辑器,具有语法加强、SQL和PL/SQL帮助、对象描述、代码助手、编译器提示、PL/SQL完善、代码内容、代码分级、浏览器按钮、超链接导航、宏库等许多智能特性,能够满足要求性最高的用户需求。当您需要某个信息时,它将自动出现,至多单击即可将信息调出。 重要功能 集成调试器   该调试器(要求Oracle 7.3.4或更高)提供您所需要的全部特性:跳入(Step In)、跳过(Step Over)、跳出(Step Out)、异常时停止运行、断点、观察和设置变量、观察全部堆栈等。基本能够调试任何程序单元(包括触发器和Oracle8 对象类型),无需作出任何修改。 PL/SQL完善器   该完善器允许您通过用户定义的规则对SQL和PL/SQL代码进行规范化处理。在编译、保存、打开一个文件时,代码将自动被规范化。该特性提高了您编码的生产力,改善了PL/SQL代码的可读性,促进了大规模工作团队的协作。 SQL 窗口   该窗口允许您输入任何SQL语句,并以栅格形式对结果进行观察和编辑,支持按范例查询模式,以便在某个结果集合中查找特定记录。另外,还含有历史缓存,您可以轻松调用先前执行过的SQL语句。该SQL编辑器提供了同PL/SQL编辑器相同的强大特性。 命令窗口   使用PL/SQL Developer 的命令窗口能够开发并运行SQL脚本。该窗口具有同SQL*Plus相同的感观,另外还增加了一个内置的带语法加强特性的脚本编辑器。这样,您就可以开发自己的脚本,无需编辑脚本/保存脚本/转换为SQL*Plus/运行脚本过程,也不用离开PL/SQL Developer集成开发环境。 报告   PL/SQL Developer提供内置的报告功能,您可以根据程序数据或Oracle字典运行报告。PL/SQL Developer本身提供了大量标准报告,而且您还可以方便的创建自定义报告。自定义报告将被保存在报告文件中,进而包含在报告菜单内。这样,运行您自己经常使用的自定义报告就非常方便。   您可以使用Query Reporter免费软件工具来运行您的报告,不需要PL/SQL Developer,直接从命令行运行即可。 工程   PL/SQL Developer内置的工程概念可以用来组织您的工作。一个工程包括源文件集合、数据库对象、notes和选项。PL/SQL Developer允许您在某些特定的条目集合范围之内进行工作,而不是在完全的数据库或架构之内。这样,如果需要编译所有工程条目或者将工程从某个位置或数据库移动到其他位置时,所需工程条目的查找就变得比较简单。 To-Do条目   您可以在任何SQL或PL/SQL源文件中使用To-Do条目快速记录该文件中那些需要进行的事项。以后能够从To-Do列表中访问这些信息,访问操作可以在对象层或工程层进行。 对象浏览器   可配置的树形浏览能够显示同PL/SQL开发相关的全部信息,使用该浏览器可以获取对象描述、浏览对象定义、创建测试脚本以便调试、使能或禁止触发器或约束条件、重新编译不合法对象、查询或编辑表格、浏览数据、在对象源中进行文本查找、拖放对象名到编辑器等。   此外,该对象浏览器还可以显示对象之间的依存关系,您可以递归的扩展这些依存对象(如包参考检查、浏览参考表格、图表类型等)。 性能优化   使用PL/SQL Profiler,可以浏览每一执行的PL/SQL代码行的时序信息(Oracle8i或更高),从而优化您SQL和PL/SQL的代码性能。   更进一步,您还可以自动获取所执行的SQL语句和PL/SQL程序统计信息。该统计信息包括CPU使用情况、块I/O、记录I/O、表格扫描、分类等。 HTML指南   Oracle目前支持HTML格式的在线指南。您可以将其集成到PL/SQL Developer工作环境中,以便在编辑、编译出错或运行时出错时提供内容敏感帮助。 非PL/SQL对象   不使用任何SQL,您就可以对表格、序列、符号、库、目录、工作、队列、用户和角色进行浏览、创建和修改行为。PL/SQL Developer提供了一个简单易用的窗体,只要将信息输入其中,PL/SQL Developer就将生成相应的SQL,从而创建或转换对象。 模板列表   PL/SQL Developer的模板列表可用作一个实时的帮助组件,

64,683

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧