problem with using trace

T

TJS

How can I use trace.warn in a code class.

I set the calling aspx page with trace=true but get this error when I put a
trace.warn("hello") in my code class
 
S

Scott M.

You really shouldn't use trace in a class definition. Instead, use it in
the application that uses the class.
 
T

TJS

The purpose is to debug, but trace seems useless here.
I don't see any way to trace private class function variables from the
calling page.

What I've done is return it from a session variable and that writes it to
the screen.



Scott M. said:
You really shouldn't use trace in a class definition. Instead, use it in
the application that uses the class.
 
S

Scott M.

The particular feature you are talking about (trace) was created as a new
way to debug web forms. You can still use all the traditional debugging
(autos, locals, watches) techniques to debug classes.


TJS said:
The purpose is to debug, but trace seems useless here.
I don't see any way to trace private class function variables from the
calling page.

What I've done is return it from a session variable and that writes it to
the screen.
 
T

TJS

i don't have any of that...


Scott M. said:
The particular feature you are talking about (trace) was created as a new
way to debug web forms. You can still use all the traditional debugging
(autos, locals, watches) techniques to debug classes.
 
S

Scott M.

Are you using Visual Studio.NET?

If so, you do have those things. If not, you may want to get it.
 
T

TJS

Most of it is for desktop development .
The price seems too high for only asp development.
 
S

Scott M.

I don't know what you mean by that. VS.NET is for client apps, web apps,
web services, class libraries, windows services, etc.

..NET doesn't limit what kind of app you can make and VS.NET lets you build
anything the .NET Framework provides for.
 
T

TJS

yes, that's the reason it is too high a price . It's a "one size shoe fits
all" and all I need is an ASP development tool
 
S

Scott M.

I don't know if I agree with that assessment, but have you tried the FREE
WebMatrix tool, available at ASP.NET?
 
T

TJS

I have WebMatrix , but it has no debugging features. Although it is a very
good tool , I find I always revert back to using Textpad for my development,
because WebMatrix alters my code without my consent.

I also have the DbgCLR.exe but that doesn't seem to work without VS, and it
has no help file.
 
G

Gabe Garza

TJS,

Did you know that there is the following as well:

Microsoft® Visual C#® .NET 2003 Standard Edition $109
Microsoft® Visual Basic® .NET 2003 Standard Edition $109
Microsoft® Visual C++® .NET 2003 Standard Edition $109

Microsoft Visual Studio 2003 has C/C++, C# and VB plus other tools depending
on the version you get, but you can just get the particular language that
you want.

Of course there's the Free WebMatrix tool that Scott mentioned from
www.asp.net that I've used as well.

One thing that I've always like about Microsoft's Visual tools is the
debugger. You want to debug your app and find the problems fast, purchasing
a Microsoft Visual Tool is your best bet.
Fixing problems or even understanding how ASP.NET works, going thru a
debugger is your best bet.
Adding Trace statements isn't the way to go.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top