玄铁剑

成功的途径:抄,创造,研究,发明...
posts - 128, comments - 42, trackbacks - 0, articles - 174

导航

<2025年4月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

常用链接

留言簿(5)

随笔分类

随笔档案

文章分类

收藏夹

AJAX

asp.net網絡鏈接

Delphi Link

IronPython

Microsoft

Other Blogs

OtherSite

SliverLight

Test

免费asp.net控件

其它链接

搜索

  •  

积分与排名

  • 积分 - 217462
  • 排名 - 26

最新评论

阅读排行榜

评论排行榜

Windows Service Debugger

Posted on 2007-01-04 21:47 玄铁剑 阅读(350) 评论(0)  编辑 收藏 引用 所属分类: Debug

Introduction

Debugging a Windows service using a VS.NET macro

 

While I started writing windows services I wished  Microsoft provided a way to debug with a single click as with the other project types.

I recently started reading about macros and here is a macro that can debug a windows service.

 

Running the macro

  1. Open Windows Service project you want to debug in VS.NET
  2. Open Macro Explorer.  Tools -> Macros -> Macro Explorer
  3. Load Macro Project in Macro Explorer
  4. Double click on “Debug” to run the macro.

 

Troubleshooting

Here is one of errors I got while I was creating the macro:

Unmanaged debugging not supported

 

Cause and Solution

This happens when debugger tries to attach to the Windows service process.

For some reason it thinks it is an unmanaged process and hence it cannot attach itself.

 The solution for this is

Install VC++.NET  which includes unmanaged debugger.

 

For details on how to do that refer to:

http://support.microsoft.com/default.aspx?scid=kb;en-us;813134

 

只有注册用户登录后才能发表评论。