HOW TO: Debug Visual Basic COM Components That Are Used Within Active Server Pages

转载 2004年06月29日 22:56:00

HOW TO: Debug Visual Basic COM Components That Are Used Within Active Server Pages

适用于
This article was previously published under Q299633

SUMMARY

This step-by-step procedure demonstrates how to debug (or step through) Microsoft Visual Basic (VB) Component Object Model (COM) components that are used within Active Server Pages (ASP) pages.

back to the top

Debugging VB COM Components That Are Used in ASP Pages

  1. On the Start menu, point to Programs, point to Microsoft Visual Studio 6.0, and then click Microsoft Visual Basic.
  2. In Visual Basic, open the COM component project that you want to debug, and set a breakpoint in the location where you want to debug. To do this, click anywhere in the statement where you want to debug. On the Visual Basic Debug menu, click Toggle Breakpoint. Notice that a colored dot appears in the left margin to indicate the breakpoint line. To remove the breakpoint, you can click the dot. To set breakpoints at other lines, you can click the corresponding locations in the margin.
  3. Press the F5 key, and run the component within the VB Integrated Development Environment (IDE). If a dialog box prompts you about how to run the component, click Wait for components to be created.
  4. Open Internet Services Manager. To open Internet Services Manager in Microsoft Internet Information Server (IIS) 5.0, follow these steps:

    1. From the Microsoft Windows Start menu, point to Programs, and then click Administrative Tools.
    2. Click Internet Services Manager.
    To open Internet Services Manager in IIS 4.0, follow these steps:
    1. From the Windows Start menu, point to Programs, and then click Windows NT 4.0 Option Pack.
    2. Click Microsoft Internet Information Server.
    3. Click Internet Service Manager.
  5. In Internet Services Manager, right-click the virtual directory that contains the ASP page that calls your component, and then click Properties. Under Anonymous Access, click Edit, and set the Directory Security of this virtual directory to anything other than Anonymous.
  6. In your Internet browser, run the ASP page that calls the component. The component automatically breaks into the VB project at the breakpoint location.
  7. Press the F8 key to debug (step through) your VB component.
back to the top

Troubleshooting

If you are already running a compiled version of this dynamic-link library (DLL) from this ASP page, you may not hit the breakpoint. In this scenario, you may want to stop and restart Microsoft Internet Information Server (IIS) services. To do this, on the Windows Start menu, click Run, and then type IISRESET. Please note that this command stops and restarts IIS, as well as all IIS applications that are running.

back to the top

REFERENCES

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:

177182 HOWTO: Debug a Visual Basic DLL under Active Server Pages

166275 HOWTO: Debug a Native Code Visual Basic Component in VC++

264957 BUG: VB DLL Has Memory Leaks and Crashes in COM+ if 'Retain In Memory' Not Set

259725 PRB: Error Occurs When You Debug a COM+ Component Under the Visual Basic IDE with an ASP Client

265492 BUG: ObjectContext Item Collection Is Empty When You Debug Under COM+

244457 HOWTO: Debug an MTS VB Component Running Under ASP

back to the top

The information in this article applies to:

  • Microsoft Active Server Pages, when used with:
    • the operating system: Microsoft Windows 2000
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Server 5.0
  • Microsoft Visual Basic Enterprise Edition for Windows 5.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 5.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0
Last Reviewed: 6/25/2004 (4.0)
Keywords: kbBug kbDebug kbhowto kbHOWTOmaster KB299633 kbAudDeveloper

Visual Basic快捷教程——流程控制

在顺序执行的过程中,有时希望计算机根据条件判断来选择性地执行(或者不执行)一些代码,这时就需要用到选择结构(或称分支结构)。另外一些时候,希望计算机能够(有条件地)重复地执行某一段代码,这时就需要用到...
  • baimafujinji
  • baimafujinji
  • 2017年04月04日 15:14
  • 3086

怎样解决无法初始化Visual Basic环境的问题

经常使用word软件,难免是遇到这样那样的问题,今天笔者在录制新宏时出现错误提示“无法初始化Visual Basic环境”,对于此问题我们该如何来解决。 工具/原料 ...
  • kyfvc
  • kyfvc
  • 2013年10月30日 09:57
  • 1529

Visual Basic快捷教程——函数与子程序

函数是结构化程序设计的基础。函数的本质就是为了把程序切分成若干个相对独立的模块各司其职,而各个函数的作用也就是仅仅专门负责自己份内的那份功能。在Visual Basic中,函数是一组以Function...
  • baimafujinji
  • baimafujinji
  • 2017年04月19日 22:30
  • 2887

【Visual Basic】计时器与窗体屏幕尺寸的取法

主要是利用一个小例子讲解VB中计时器Timer的运用。 如下图所示: 有一个显示当前时间,在屏幕的边缘不停地移动。 首先是窗体设置,直接从工具箱拖入Label与Timer控件。Timer...
  • yongh701
  • yongh701
  • 2015年08月06日 09:30
  • 1304

数据库——SQL server2008安装与visual basic连接

这是自己当时初始CSDN上写的第一篇博客,其中当时的心情依然记忆尤新,总之美美的。...
  • u013030601
  • u013030601
  • 2014年06月29日 11:32
  • 1487

Nginx 编译,添加未编译安装模块ngx_cache_purge

,添加未编译安装模块ngx_cache_purge 官网下载nginx及第三方ngx_cache_purge 模块 http://wiki.nginx.org/Install http://l...
  • lgh1117
  • lgh1117
  • 2015年10月16日 16:02
  • 719

【转帖】Android zxing 横屏 改竖屏识别解决方案

在网上找了很多方法,但最后都有问题,自己调试了好几个小时,最后终于完美解决了竖屏识别。 首先你需要有zxing项目的简化版代码,在这里。 使用简化版可以免去许多不必要的代码,方便学习研究,...
  • ilittleone
  • ilittleone
  • 2013年10月15日 11:28
  • 15917

Visual Basic快速入门

Basic语言的全名是Beginner’s All-purpose Symbolic Instruction Code(初学者通用的符号指令代码),是几十年前流行过的一门语言。我高中时候一门数学选修课...
  • u011054333
  • u011054333
  • 2018年01月05日 18:26
  • 44

Visual Basic快捷教程——异常处理机制

所谓“异常(Exception)”是指程序运行时所发生的不正常的情况。为了避免程序在运行时发生不正常的错误情况,就需要利用某种机制来捕捉到这些问题,并及时应对随之而来的麻烦,从而避免程序陷入无法继续执...
  • baimafujinji
  • baimafujinji
  • 2016年01月23日 19:12
  • 6259

虚拟机安装centos 6.5 basicserver 配置联网

设置虚拟机网络为“桥接网络”并勾选“复制物理机网络状态” 获取你电脑现在的ip地址等信息,例如windows10,进入“cmd”命令行输入“ipconfig”回车即可 我电脑通过wifi链接到互联网...
  • favefan
  • favefan
  • 2017年05月19日 21:17
  • 406
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:HOW TO: Debug Visual Basic COM Components That Are Used Within Active Server Pages
举报原因:
原因补充:

(最多只允许输入30个字)