473,382 Members | 1,238 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

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 . . .
Nov 19 '05 #1
5 2448
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/de...serttopic1.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/
======================================
"Mr Newbie" <he**@now.com> wrote in message news:Or**************@TK2MSFTNGP15.phx.gbl...
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 . . .

Nov 19 '05 #2
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


"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:ui**************@TK2MSFTNGP09.phx.gbl...
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/de...serttopic1.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/
======================================
"Mr Newbie" <he**@now.com> wrote in message
news:Or**************@TK2MSFTNGP15.phx.gbl...
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 . . .


Nov 19 '05 #3
"Mr Newbie" <he**@now.com> wrote in message
news:uA**************@TK2MSFTNGP09.phx.gbl...
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?
Nov 19 '05 #4
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

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

"Danny Tuppeny" <gr****@dannytuppeny.commmmmm> wrote in message
news:43***********************@ptn-nntp-reader03.plus.net...
"Mr Newbie" <he**@now.com> wrote in message
news:uA**************@TK2MSFTNGP09.phx.gbl...
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?

Nov 19 '05 #5
OK, thanks for your help Karl.

Much appreciated.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:up*************@TK2MSFTNGP10.phx.gbl...
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

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

"Danny Tuppeny" <gr****@dannytuppeny.commmmmm> wrote in message
news:43***********************@ptn-nntp-reader03.plus.net...
"Mr Newbie" <he**@now.com> wrote in message
news:uA**************@TK2MSFTNGP09.phx.gbl...
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?


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Smith | last post by:
Sorry if this is the wrong forum... Does anyone know what the difference is between a debug build and an optimised debug build in Visual Studio 2003?
1
by: John Holmes | last post by:
My application is ready to deploy and I've set debug=false in the web.config file and configured the app for release mode. When I try to run the app from the IDE, I get the following error message:...
2
by: Jeremy S. | last post by:
By default, Web.config has the following section: <compilation defaultLanguage="c#" debug="true" /> note that debug="true" There is a comment - also in the default Web.config - that states...
3
by: Whiplash | last post by:
I've got a web app that has the debug parameter in the web.config file set to true. Everything works great. However, I want to set debug to false before putting the app into production. When I do...
2
by: wcchan | last post by:
Hi, We set debug="false" at web.config of a WebService for performance sake. We found that after set, the web service request will sometimes got a timeout exception. Would anyone tell me how long...
1
by: joemynz | last post by:
Help please with a URLError. Invoking a url that works in Firefox and IE results in a "urlerror 7, no address ..." in python. I need to debug why. Traceback is below. There's a redirect when the...
5
by: Cas | last post by:
Hi, If i omit to mention e.g. the option 'debug' in the line below of an aspx file, does it means it's set to false? <%@ Page Language="VB" CodeFile="any.aspx.vb" Inherits="_Default" %> ...
3
by: André | last post by:
Hi, I put that question already, but it's still not very clear to me, so ... Assume following option in web.config= debug="false" but in one aspx page (test.aspx) <%@ debug="true" ..%>
10
by: Paul Rubin | last post by:
So I have some assert statements in my code to verify the absence of some "impossible" conditions. They were useful in debugging and of course I left them in place for "real" runs of the program. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.