Debugging a Class

Is there a way to test and debug a class without plugging it into an app using Visual Studio?

For example, there is this

class MyApp
{
    MyApp()
    {

    }

    public void Test(string yourString
    {
        Console.Write(yourString);
    }
}

Sorta like debugging but you don't have to compile it to see if it works.
JoshDaleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

y1381Commented:
The only way I can suggest would be within the same solution create another Project called Debugger and use it to debug the class, that way you can watch runtime variables and use breakpoints within you class library.

I am guessing that you are create a project that will generate a .dll and you want to debug that.

Once you create another new project you will have to goto the solution properties and change the startup project.
JoshDaleAuthor Commented:
Yea something like that. I was thinking of a feature where you could change the value of variables at runtime. Sorta like writing an application while it is running and watching the output.
natejacobsCommented:
JoshDale -

You'll always have to compile the class to see if it works.  What kind of class are you working on?  Is it a console app?  Why not use VS?
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Daniel Van Der WerkenIndependent ConsultantCommented:
You have to compile it.  In Visual Studio, it's possible to slightly change some things via the debugger, for example, memory.  However, this doesn't work well with other things, like strings.

Behind the scenes, the runtime creates the memory allocations based on the way the program is written. You don't want to try to "dynamically" change a string lenght from one to another bypassing the correct route or you'll overwrite the wrong memory addresses.
ViceroyFizzlebottomCommented:
You should look into Visual Studio 2005. It has a new feature allowing you break on a statement, make certain allowable changes, and manually adjust
the next instruction pointer if necessary.
It creates a dramatic improvement in debugging time.

-Vice

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JoshDaleAuthor Commented:
Nice, I was just playing with it on the 2005 beta, I didn't know it was there. It is close enough to what I was looking for, thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.