亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? apd.htm

?? Learning language of Visual C++6
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>

<HEAD>
<SCRIPT LANGUAGE="JavaScript">

<!--

function popUp(pPage) {
 var fullURL = document.location;
 var textURL = fullURL.toString();
 var URLlen = textURL.length;
 var lenMinusPage = textURL.lastIndexOf("/");
 lenMinusPage += 1;
 var fullPath = textURL.substring(0,lenMinusPage);
 popUpWin = window.open('','popWin','resizable=yes,scrollbars=no,width=525,height=394');
 figDoc= popUpWin.document;
 zhtm= '<HTML><HEAD><TITLE>' + pPage + '</TITLE>';
 zhtm += '<link rel="stylesheet" href="/includes/stylesheets/ebooks.css"></head>';
 zhtm += '<BODY bgcolor="#FFFFFF">';
 zhtm += '<IMG SRC="' + fullPath + pPage + '">';
 zhtm += '<P><B>' + pPage + '</B>';
 zhtm += '</BODY></HTML>';
 window.popUpWin.document.write(zhtm);
 window.popUpWin.document.close();
 // Johnny Jackson 4/28/98
 }

//-->
                                                                
</SCRIPT>
<link rel="stylesheet" href="/includes/stylesheets/ebooks.css">

	
	<TITLE>Special Edition Using Visual C++ 6 -- Appendix D -- Debugging</TITLE>
</HEAD>

<BODY TEXT="#000000" BGCOLOR="#FFFFFF">

<CENTER>
<H1><IMG SRC="../button/que.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM" BORDER="0"><BR>
Special Edition Using Visual C++ 6</H1>
</CENTER>
<CENTER>
<P><A HREF="../apc/apc.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"
ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ape/ape.htm"><IMG
SRC="../button/next.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Next chapter"
BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../button/contents.gif" WIDTH="128"
HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A> 
<HR>

</CENTER>
<CENTER>
<H1>- D -</H1>
</CENTER>
<CENTER>
<H1>Debugging</H1>
</CENTER>

<UL>
	<LI><A HREF="#Heading1">Debugging Vocabulary</A>
	<LI><A HREF="#Heading2">Debugging Commands and Windows</A>
	<UL>
		<LI><A HREF="#Heading3">Menu Items</A>
		<LI><A HREF="#Heading4">Setting Breakpoints</A>
		<LI><A HREF="#Heading5">Examining Variable Values</A>
		<LI><A HREF="#Heading6">Stepping Through Code</A>
		<LI><A HREF="#Heading7">Edit and Continue</A>
		<LI><A HREF="#Heading8">Other Debug Windows</A>
	</UL>
	<LI><A HREF="#Heading9">Using MFC Tracer</A>
	<LI><A HREF="#Heading10">Defining a Dump Member Function</A>
	<UL>
		<LI><A HREF="#Heading11">An Example Using CDumpContext, CFile, and axfDump</A>
	</UL>
</UL>

<P>
<HR SIZE="4">

<CENTER>
<H1></H1>
</CENTER>
<P>Debugging is a vital part of programming. Whenever a program doesn't do what you
expect, even if it doesn't blow up, you should turn to the debugger to see what's
really going on. Some of the philosophies and techniques of debugging have been explained
elsewhere in this book, especially in Chapter 24, &quot;Improving Your Application's
Performance.&quot; This appendix concentrates on the nuts and bolts of how to use
the debugger: the menus, toolbars, and windows that were not covered in Appendix
C, &quot;The Visual Studio User Interface, Menus, and Toolbars.&quot;</P>
<P>
<H2><A NAME="Heading1"></A>Debugging Vocabulary</H2>
<P>Probably the most important word in debugging is <I>breakpoint</I>. A breakpoint
is a spot in your program, a single line of code, where you would like to pause.
Perhaps you are wondering how many times a loop is executed, whether control transfers
inside a certain if statement, or whether a function is even called. Setting a breakpoint
on a line will make execution stop when that line is about to be executed. At that
point you may want the program to be off and running again or want to move through
your code a line or so at a time. You may want to know some of your variables' values
or see how control transferred to this point by examining the call stack. Often,
you'll spot the cause of a bug and correct your code on the spot.</P>
<P>When it's time to move along, there are a number of ways you might like execution
to resume. These are explained in the following list:</P>

<UL>
	<LI><I>Go</I>--Execute to the next breakpoint or, if there are no more breakpoints,
	until the program completes.
	<P>
	<LI><I>Restart</I>--Start again from the beginning.
	<P>
	<LI><I>Step Over</I>--Execute only the next statement, and then pause again. If it
	is a function call, run the whole function and pause after returning from it.
	<P>
	<LI><I>Step Into</I>--Execute just the next statement, but if it is a function, go
	into it and pause before executing the first statement in the function.
	<P>
	<LI><I>Step Out</I>--Execute the rest of the current function and pause in the function
	that called this one.
	<P>
	<LI><I>Run to Cursor</I>--Start running and stop a few (or many) lines from here,
	where the cursor is positioned.
</UL>

<P>Most information made available to you by the debugger is in the form of new windows.
These are discussed in the following sections.</P>
<P>
<H2><A NAME="Heading2"></A>Debugging Commands and Windows</H2>
<P>Developer Studio has a powerful debugger with a rich interface. There are menu
items, toolbar buttons, and windows (output areas) that are used only when debugging.</P>
<P>
<H3><A NAME="Heading3"></A>Menu Items</H3>
<P>The user interface for debugging starts with items on some ordinary menus that
are used only in debugging and are not discussed in Appendix C. These include</P>

<UL>
	<LI>Edit, Breakpoints
	<P>
	<LI>View, Debug Windows, Watch
	<P>
	<LI>View, Debug Windows, Call Stack
	<P>
	<LI>View, Debug Windows, Memory
	<P>
	<LI>View, Debug Windows, Variables
	<P>
	<LI>View, Debug Windows, Registers
	<P>
	<LI>View, Debug Windows, Disassembly
	<P>
	<LI>Build, Start Debug, Go
	<P>
	<LI>Build, Start Debug, Step Into
	<P>
	<LI>Build, Start Debug, Run to Cursor
	<P>
	<LI>Build, Start Debug, Attach to Process
	<P>
	<LI>Build, Debugger Remote Connection
</UL>

<P>These are not the only menu items you'll use, of course. For example, the Edit,
Go To dialog box can be used to scroll the editor to a specific breakpoint as easily
as a line, bookmark, or address. Many menu items you've already learned about are
useful during debugging.</P>
<P>When you start debugging, the Build menu disappears and a Debug menu appears.
The items on that menu are as follows:</P>

<UL>
	<LI>Debug, Go
	<P>
	<LI>Debug, Restart
	<P>
	<LI>Debug, Stop Debugging
	<P>
	<LI>Debug, Break
	<P>
	<LI>Debug, Apply Code Changes
	<P>
	<LI>Debug, Step Into
	<P>
	<LI>Debug, Step Over
	<P>
	<LI>Debug, Step Out
	<P>
	<LI>Debug, Run to Cursor
	<P>
	<LI>Debug, Step into Specific Function
	<P>
	<LI>Debug, Exceptions
	<P>
	<LI>Debug, Threads
	<P>
	<LI>Debug, Show Next Statement
	<P>
	<LI>Debug, QuickWatch
</UL>

<P>As you can see, some items from the Build, Start Debug cascading menu are also
on the Debug menu, along with many other items. The sections that follow discuss
the individual items.</P>
<P>
<H3><A NAME="Heading4"></A>Setting Breakpoints</H3>
<P>Probably the simplest way to set a breakpoint is to place the cursor on the line
of code where you would like to pause. Then, toggle a breakpoint by pressing F9 or
by clicking the Insert/Remove Breakpoint button on the Build MiniBar, which looks
like an upraised hand (you're supposed to think &quot;Stop!&quot;). A red dot appears
in the margin to indicate you have placed a breakpoint here, as shown in Figure D.1.</P>
<P><A HREF="javascript:popUp('xduvc01.gif')"><B>FIG. D.1</B></A><B> </B><I>The F9
key toggles a breakpoint on the line containing the cursor.</I></P>
<P>


<BLOCKQUOTE>
	<P>
<HR>
<strong>NOTE:</strong> The application being debugged throughout this appendix is ShowString,
	as built in Chapter 8, &quot;Building a Complete Application: ShowString.&quot;&#160;n
	
<HR>


</BLOCKQUOTE>

<P>Choosing Edit, Breakpoints displays a tabbed dialog box to set simple or conditional
breakpoints. For example, you may want to pause whenever a certain variable's value
changes. Searching through your code for lines that change that variable's value
and setting breakpoints on them all is tiresome. Instead, use the Data tab of the
Breakpoints dialog box, shown in Figure D.2. When the value of the variable changes,
a message box tells you why execution is pausing; then you can look at code and variables,
as described next.</P>
<P>You can also set conditional breakpoints, such as break on this line when i exceeds
100, that spare you from mindlessly clicking Go, Go, Go until you have been through
a loop 100 times.</P>
<P><A HREF="javascript:popUp('xduvc02.gif')"><B>FIG. D.2</B></A><B> </B><I>You can
arrange for execution to pause whenever a variable or expression changes value.</I></P>
<H3><I></I></H3>
<H3><A NAME="Heading5"></A>Examining Variable Values</H3>
<P>When you set a breakpoint and debug the program, everything proceeds normally
until the breakpoint line of code is about to execute. Then Developer Studio comes
up on top of your application, with some extra windows in the display and a yellow
arrow in the red margin dot that indicates your breakpoint, as shown in Figure D.3.
This shows you the line of code that is about to execute.</P>
<P><A HREF="javascript:popUp('xduvc03.gif')"><B>FIG. D.3</B></A><B> </B><I>A yellow
arrow indicates the line of code about to execute.</I></P>
<P>Move the mouse over a variable name, like color or horizcenter. A DataTip appears,
telling you the current value of this variable. You can check as many local variables
as you want like this, then continue executing, and check them again. There are other
ways, though, to examine variable values.</P>
<P>You could click on the variable (or move the cursor to it some other way) and
choose Debug, QuickWatch or click the QuickWatch button (a pair of glasses) on the
toolbar. This brings up the QuickWatch window, which shows you the value of a variable
or expression and lets you add it to the Watch window, if you want. You're probably
wondering why anyone uses this feature now that DataTips will show you a variable's
value without even clicking. DataTips can't handle expressions, even simple ones
like dlg.m_horizcenter, but QuickWatch can, as you see in Figure D.4. You can also
change a variable's value with this dialog box to recover from horrible errors and
see what happens.</P>
<P><A HREF="javascript:popUp('xduvc04.gif')"><B>FIG. D.4</B></A><B> </B><I>The QuickWatch
dialog box evaluates expressions. You add them to the Watch window by clicking Add
Watch.</I></P>
<P>Figure D.5 shows a debug session after running forward a few lines from the original
breakpoint (you'll see how to do this in a moment). The Watch and Variable windows
have been undocked to show more clearly which is which, and two watches have been
added: one for horizcenter and one for dlg.m_horizcenter. The program is paused immediately
after the user clicks OK on the Options dialog, and in this case the user changed
the string, the color, and both kinds of centering.</P>
<P>The Watch window simply shows the values of the two variables that were added
to it. horizcenter is still TRUE (1) because the line of code that sets it has not
yet been executed. dlg.m_horizcenter is FALSE (0) because the user deselected the
check box associated with the member variable. (Dialogs, controls, and associating
controls with member variables are discussed in Chapter 2, &quot;Dialogs and Controls.&quot;)</P>
<P>The Variables window has a lot more information in it, which sometimes makes it
harder to use. The local variable dlg and the pointer to the object for whom this
member function was invoked, this, are both in the Variables window in tree form:
Click on a + to expand the tree and on a - to collapse it. In addition, the return
value from DoModal(), 1, is displayed.</P>
<P>At the top of the Variables window is a drop-down box labeled <I>Context</I>.
Dropping it down shows how control got here: It lists the names of a series of functions.
The top entry is the function in which the line about to be executed is contained,
CShowStringDoc::OnToolsOptions(). The second entry is the function that called this
one, _AfxDispatchCmdMsg(), which dispatches command messages. Chapter 3, &quot;Messages
and Commands,&quot; introduces commands and messages and discusses the way that control
passes to a message-handling function like OnToolsOptions(). Here, the debugger gives
proof of this process right before your eyes.</P>
<P><A HREF="javascript:popUp('xduvc05.gif')"><B>FIG. D.5</B></A><B> </B><I>The Watch
window and the Variable window make it easy to know the values of all your variables.</I></P>
<P>Click on any function name in the drop-down box and the code for that function
is displayed. You can look at variables local to that function, and so on.</P>
<P>The Call Stack window, shown in Figure D.6, is easier to examine than the drop-down
box in the Variables window, and it shows the same information. As well as the function
names, you can see the parameters that were passed to each function. You may notice
the number 32771 recurring in most of the function calls. Choose View, Resource Symbols,
and you'll see that 32771 means ID_TOOLS_OPTIONS, the resource ID associated with
the menu item Tools, Options in ShowString (see Figure D.7).</P>
<P><A HREF="javascript:popUp('xduvc06.gif')"><B>FIG. D.6</B></A><B> </B><I>The Call
Stack window shows how you arrived here.</I></P>
<P>
<H3><A NAME="Heading6"></A>Stepping Through Code</H3>
<P>Double-clicking a function name in the call stack or the context drop-down box
of the Variables window doesn't make any code execute: It simply gives you a chance

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美网站一区二区| 欧美精品v国产精品v日韩精品 | 大胆亚洲人体视频| 国产在线精品一区二区三区不卡| 午夜精品福利一区二区蜜股av| 1024成人网| 亚洲色图在线播放| 亚洲一区二区三区四区不卡| 亚洲国产精品一区二区www| 天天色 色综合| 久久精品久久综合| 国产精一区二区三区| 成人免费高清视频| 色欧美88888久久久久久影院| 91麻豆自制传媒国产之光| 日本高清不卡视频| 日韩欧美国产一区二区三区| 久久久久久久久久久久久女国产乱| 欧美videossexotv100| 久久精品亚洲精品国产欧美kt∨| 国产欧美日产一区| 亚洲一区二区三区四区不卡| 日本伊人午夜精品| 国产高清亚洲一区| 91国偷自产一区二区使用方法| 欧美日韩不卡视频| 久久精品亚洲精品国产欧美kt∨| 中文字幕一区二区三区在线不卡 | 日韩亚洲欧美中文三级| 久久综合一区二区| 亚洲人成影院在线观看| 蜜臀av一区二区| aaa欧美日韩| 欧美成人艳星乳罩| 一级特黄大欧美久久久| 黑人巨大精品欧美一区| 在线免费不卡视频| 久久天天做天天爱综合色| 亚洲丝袜精品丝袜在线| 久久国产麻豆精品| 欧美日韩色一区| 国产喷白浆一区二区三区| 性做久久久久久久免费看| 国产精品白丝av| 在线电影一区二区三区| 国产精品久久久久一区二区三区 | 久久精品综合网| 亚洲www啪成人一区二区麻豆| 麻豆91在线观看| 91伊人久久大香线蕉| 欧美大片免费久久精品三p| 一区二区三区中文字幕在线观看| 国产综合久久久久久久久久久久| 欧美性三三影院| 1024成人网| 不卡一区中文字幕| 国产情人综合久久777777| 久久99精品国产麻豆婷婷| 欧美在线free| 亚洲精品国产视频| caoporen国产精品视频| 日本一区二区三区电影| 韩国女主播一区| 久久综合99re88久久爱| 蜜桃一区二区三区四区| 欧美一级视频精品观看| 午夜伦理一区二区| 3atv在线一区二区三区| 亚洲成人午夜影院| 在线成人av网站| 午夜日韩在线观看| 欧美性大战久久| 午夜在线成人av| 欧美三级韩国三级日本三斤| 亚洲精品你懂的| 欧美手机在线视频| 日韩制服丝袜av| 欧美一区二区观看视频| 男男成人高潮片免费网站| 欧美一级一级性生活免费录像| 日韩在线一二三区| 欧美va亚洲va香蕉在线| 国产精品资源在线看| 精品国产91洋老外米糕| 激情久久五月天| 国产精品女同一区二区三区| 成人aaaa免费全部观看| 亚洲三级电影网站| 欧美日韩在线播放| 久久不见久久见中文字幕免费| 久久综合资源网| 99久久国产综合精品色伊| 亚洲一区二区视频| 日韩午夜电影在线观看| 国产精品 欧美精品| 国产精品福利一区| 欧美高清性hdvideosex| 激情亚洲综合在线| 亚洲色图一区二区三区| 日韩一区二区电影网| 国产一区二区成人久久免费影院| 国产精品免费观看视频| 欧美日韩精品电影| 国产91丝袜在线播放| 一区二区不卡在线播放 | 天天综合天天综合色| 精品捆绑美女sm三区| 国产精品亚洲а∨天堂免在线| 亚洲精品视频观看| 久久美女艺术照精彩视频福利播放| 成人久久久精品乱码一区二区三区| 亚洲欧美日韩在线不卡| 精品免费一区二区三区| 色一情一伦一子一伦一区| 国产一区高清在线| 亚洲一二三区在线观看| 国产欧美日本一区二区三区| 日韩欧美亚洲国产另类| 色乱码一区二区三区88| 国产精品亚洲综合一区在线观看| 亚洲午夜免费视频| 亚洲视频一区在线| 久久久久99精品一区| 欧美精品久久一区二区三区| 99国产欧美久久久精品| 国产综合久久久久久久久久久久| 亚洲高清久久久| 综合自拍亚洲综合图不卡区| 日韩女优毛片在线| 欧美日韩高清在线播放| 91免费观看在线| 国产iv一区二区三区| 美女精品自拍一二三四| 亚洲福中文字幕伊人影院| 亚洲视频1区2区| 国产精品亲子伦对白| 久久亚洲二区三区| 精品久久久网站| 欧美成人aa大片| 日韩一区二区电影在线| 在线不卡免费av| 欧美日韩一区精品| 欧美影院精品一区| 91国产视频在线观看| 日本高清视频一区二区| 色94色欧美sute亚洲线路二| 99精品欧美一区二区三区综合在线| 高清久久久久久| 成人自拍视频在线| av动漫一区二区| 91日韩一区二区三区| 一本高清dvd不卡在线观看| 99久久久久久| 色猫猫国产区一区二在线视频| 色综合久久久久综合99| 日本久久电影网| 色综合久久天天| 欧美色电影在线| 欧美一区二区三区在| 精品久久久三级丝袜| 国产欧美一区二区精品仙草咪| 国产拍欧美日韩视频二区| 中文字幕制服丝袜成人av| 国产精品不卡一区| 洋洋av久久久久久久一区| 亚洲高清久久久| 久久se这里有精品| 成人黄色电影在线| 欧洲在线/亚洲| 欧美一区永久视频免费观看| 精品欧美乱码久久久久久1区2区| 亚洲精品一区在线观看| 国产精品三级电影| 亚洲国产你懂的| 国产一区二三区| 91最新地址在线播放| 337p亚洲精品色噜噜噜| 久久久久一区二区三区四区| 亚洲欧美日韩系列| 男女男精品视频网| caoporen国产精品视频| 欧美日韩一区中文字幕| 久久久国产精品麻豆| 亚洲精品中文字幕乱码三区| 丝袜美腿高跟呻吟高潮一区| 国产一区91精品张津瑜| 色狠狠色狠狠综合| 久久综合99re88久久爱| 一区二区三区在线视频观看| 蜜桃av噜噜一区二区三区小说| 国产suv一区二区三区88区| 欧美日韩专区在线| 国产精品国产三级国产| 日本成人在线网站| 99国产麻豆精品| 国产网红主播福利一区二区| 午夜在线电影亚洲一区| 99国产精品视频免费观看| 久久影院午夜论| 日韩主播视频在线|