Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

Debug.Assert( False, "Why wont I display ??")

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mr Newbie - 29 Oct 2005 19:20 GMT
Debug.Assert( False, "Why wont I display ??")

I am trying to use this in my code but it wont display. The app is running
on my local machine and the above code under a button click event.

What am I missing ?

Cheers mr N . . .
Juan T. Llibre - 29 Oct 2005 19:51 GMT
The syntax is :

Debug.Assert Method (Boolean, String)
Checks for a condition and displays a message if the condition is false.

Example :

Public Shared Sub MyMethod(type As Type, baseType As Type)
Debug.Assert(Not (type Is Nothing), "Type parameter is null")
End Sub

What's the method/condition you're testing ?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemdiagnosticsdebugclassasserttopic1.asp


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
> Debug.Assert( False, "Why wont I display ??")
>
[quoted text clipped - 4 lines]
>
> Cheers mr N . . .
Mr Newbie - 29 Oct 2005 19:56 GMT
Yes I know, thats my example but it does not work. I'm simply trying to get
the line to work and display the dialog box on my local server if the
assertion failed, but it does naff all and simply goes about its business
without so much as a sneeze !!!

Cheers Mr N

> The syntax is :
>
[quoted text clipped - 24 lines]
>>
>> Cheers mr N . . .
Danny Tuppeny - 29 Oct 2005 21:09 GMT
> Yes I know, thats my example but it does not work. I'm simply trying to
> get the line to work and display the dialog box on my local server if the
> assertion failed, but it does naff all and simply goes about its business
> without so much as a sneeze !!!

I don't know anything about Debug.Assert, but does it only work in debug
mode, and you're not debugging?
Karl Seguin - 29 Oct 2005 23:10 GMT
Debug.Assert doesn't work very well for asp.net applications.  You need to
check the VS.Net output window and run the code from VS.Net.  Not very
practicaly.  Supposedly you can do stuff to fix it, like:
http://www.vbinfozine.com/t_aspnetassert.shtml

but I've never tried.

Karl

Signature

MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

>> Yes I know, thats my example but it does not work. I'm simply trying to
>> get the line to work and display the dialog box on my local server if the
[quoted text clipped - 3 lines]
> I don't know anything about Debug.Assert, but does it only work in debug
> mode, and you're not debugging?
Mr Newbie - 30 Oct 2005 08:56 GMT
OK, thanks for your help Karl.

Much appreciated.

> Debug.Assert doesn't work very well for asp.net applications.  You need to
> check the VS.Net output window and run the code from VS.Net.  Not very
[quoted text clipped - 12 lines]
>> I don't know anything about Debug.Assert, but does it only work in debug
>> mode, and you're not debugging?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.