Click here to Skip to main content
13,352,175 members (74,137 online)
Click here to Skip to main content
Add your own
alternative version


11 bookmarked
Posted 4 Jul 2008

Attach Debugger to NUnit using Macro

, 4 Jul 2008
Rate this:
Please Sign up or sign in to vote.
Saves you some mouse clicks when debugging NUnit GUI


If you have ever felt bored of wasting time opening Debug -> Attach of Visual Studio to attach to NUnit GUI application for debugging, then this macro is for you.


No background is required.

Using the Code

First, download and extract the file Debug.vb inside this zip to your local drive.

Next, open Macros IDE by either going to menu Tools -> Macros -> Macros IDE or pressing Alt + F11.

After the IDE is open, in its Project Explorer Windows, right click on MyMacros and choose Add -> Add Existing Item. Then point the file browser to file Debug.vb.

Now, close the Macros IDE and open the Macros Explorer by either going to menu Tools -> Macros -> Macro Explorer or pressing Alt + F8. There is a macro named DebugNunit under MyMacros.Debug.

From now on, you can run the macro by double clicking on it in Macro Explorer to attach to NUnit GUI application. In order to make life a little bit easier, we can create a toolbar button for this macro. All the things you need to do is right click on your toolbar and choose Customize, then browse to command MyMacros.Debug.DebugNunit as in the figure shown below:


Drag the command to anywhere most suitable for you and forget about all macro things. Just click the button whenever you want to attach to NUnit GUI for debugging.

Points of Interest

There are no points of interest except trying to find some "solution" for your laziness:-).


  • 5th July, 2008: Initial post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior)
Vietnam Vietnam
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralThank you! Pin
DrMcClelland2-Jul-09 8:08
memberDrMcClelland2-Jul-09 8:08 
It works great for what we need!
GeneralRe: Thank you! Pin
ntr9h2-Jul-09 18:04
memberntr9h2-Jul-09 18:04 
GeneralError Pin
HariPriya24-Apr-09 11:22
memberHariPriya24-Apr-09 11:22 
GeneralRe: Error Pin
ntr9h27-Apr-09 0:24
memberntr9h27-Apr-09 0:24 
QuestionCan't you just set debug to run NUnit? Pin
Member 21876788-Jul-08 17:45
memberMember 21876788-Jul-08 17:45 
AnswerRe: Can't you just set debug to run NUnit? Pin
ntr9h8-Jul-08 21:28
memberntr9h8-Jul-08 21:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.180111.1 | Last Updated 5 Jul 2008
Article Copyright 2008 by ntr9h
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid