CodeView
Encyclopedia
CodeView was a standalone debugger
Debugger
A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

 created by David Norris at Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 in 1985 as part of its development toolset. It originally shipped with Microsoft C 4.0 and later. It also shipped with Visual Basic
Visual Basic
Visual Basic is the third-generation event-driven programming language and integrated development environment from Microsoft for its COM programming model...

 for MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

, Microsoft Basic PDS, and a number of other Microsoft language products. It was one of the first debuggers on the MS-DOS platform that was full-screen oriented, rather than line oriented (like its predecessors DEBUG.COM
DEBUG (DOS Command)
debug is a command in DOS, MS-DOS, OS/2 and Microsoft Windows which runs the program debug.exe...

 and symdeb).

When running, CodeView would present the user with several windows
Window (computing)
In computing, a window is a visual area containing some kind of user interface. It usually has a rectangular shape that can overlap with the area of other windows...

 that could be tiled, moved, sized and otherwise manipulated via the keyboard or mouse, with CodeView 4.x providing a richer interface. Some of the windows included:
  • Code window - the code window showed the currently debugged code in its source code
    Source code
    In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

     context.
  • Data window - a hexadecimal dump of a user-specified memory area.
  • Watch window - a contextual display of variables by name.
  • Locals window - a contextual display of variables local to the current function.
  • Command window - user commands (using the same or similar syntax as DEBUG.COM and symdeb) could be entered here.
  • Assembly window - the assembly (machine code) was displayed, allowing for single-stepping through functions.
  • Register window - to visualize the 80x86 register contents, including segments, flags and the FPU (CodeView existed before MMX and other SIMD extensions).
  • Output window - a window showing startup operations and debugging information relating to breakpoints, hardware breaks (interrupt 0 and 3), etc.
  • 386 mode - CodeView supported 8086, 80286 and 80386 and later processors. 386 enhanced mode was activated by a menu option, allowing for 32-bit registers and disassembly.

  • Monochrome monitor support - CodeView supported debugging on either a single color (CGA, EGA or VGA) monitor with page/memory swapping between the user application and the CodeView screen, or through a feature which utilized a separate monochrome monitor. The monochrome monitor existed in memory address space 0xb0000, while the color monitor existed at 0xb8000 for text and 0xa0000 for graphics. Use of the monochrome monitor with its separate memory address space allowed debugging graphics applications without affecting the display, as well as all text modes. Monochrome monitor support was limited to 25 lines, whereas color monitors could utilize 25, 43 or 50 line mode, allowing for more information on the screen at the same time.


Creating symbolic debugging output, which allowed memory locations to be viewed by their programmer-assigned name, along with a program database showing the source code line related to every computer instruction in the binary executable, was provided for by the command line switch -Zi given to the compiler, and -CO given to the linker. Variants like -Zs and -Zd provided lesser information, and smaller output files which, during the early 1990s, were important due to limited machine resources, such as memory and hard disk capacity. Many systems in those days had 8MB of memory or less.

CodeView supported all program models, including TINY, SMALL, COMPACT, MEDIUM, LARGE and HUGE, with TINY (DOS-based .COM files) having their symbolic debugger information stored in a separate file, with all of the other .EXE formats containing the symbolic information directly inside the executable. This often introduced a notable size increase, and it therefore became desirable for some developers to use #pragma switches within their C++ source code to prevent the majority of the application from having symbolic output, and instead limiting that output to only those portions which required it for current debugging.

CodeView version 3.x and more notably 4.x introduced various transport layers, which removed some of the memory space limitations to this form of symbolic debugging. Typically the debugger would run in the lower 640KB memory space alongside the application being debugged, which greatly decreased the amount of memory available to the application being debugged. The transport layer allowed only a stub to exist in main memory, while the bulk of the debugger code resided in EMS or XMS (memory above the 1MB barrier, or outside of the normal 0KB - 640KB address space typically used by DOS programs). CodeView also came with a CVPACK command-line utility, which could reduce the size of the CodeView-generated information internally, while still retaining full symbolic access to data.

Microsoft released Visual C++
Visual C++
Microsoft Visual C++ is a commercial , integrated development environment product from Microsoft for the C, C++, and C++/CLI programming languages...

 1.0 with CodeView functionality integrated directly into a single programming environment, known as the Integrated Development Environment
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

 (IDE) -- though CodeView was still available in the 16-bit versions of Visual C++. QuickC
QuickC
Microsoft QuickC was a commercial integrated development environment product engineered by Microsoft for the C programming language, superseded by Visual C++ Standard Edition. Its main competitor was Turbo C.-Version history:...

 and a number of other development tools in the 'Quick' series also supported this move to a single-source IDE, what became the precursor to the modern Visual Studio developer environment, as well as the model for countless other developer toolsets.

This integration was seen by many developers as a more natural way of developing software because both coding and debugging could be handled without switching programs or context, and all from the same logical location (even though internally many separate programs were running to support editing, compiler and debugging).

This integration was so popular that most development tools and/or platforms offer similar products or features. Today, the debugger is considered an integrated and essential part of the Microsoft Visual Studio
Microsoft Visual Studio
Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all...

family of products, and owes its true roots to CodeView, and the enhancements seen in version 4.x specifically.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK