473,387 Members | 1,463 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,387 software developers and data experts.

Erratic debugging behavior / WriteLine won't work.

Hello,

I have Visual Studio 2003, working on a VB.net project. When I try to step
through the code, the behavior is erratic, stepping in places where no code
exists, jumping over code sections without any goto lines or anything, and
also, when I try to use WriteLine, Console.Writeline or Debug.Writeline
nothing happens, nothing comes out in the command window. It's driving me
nutz!

Here is a snippet of code that was left with all my test ramblings in it.
To give you an idea of where the debugger jumps, (at one point that I can
recall off hand) it will jump from the first "Next" statement down to the
"dc.AutoIncrementStep = -1" line. From there it hits the next blank line,
then skips the next two lines of code to another blank line, then skips
another two lines of code landing on the "view2 = New
DataView(dsInventoryTypeOrders.Tables("Orders"))" line.

Any help would get GREATLY welcomed, as this is taking its tollon me!

Thanks!

Private Sub LoadData()

Dim daOrders As New OleDb.OleDbDataAdapter

Dim daOrderDetails As New OleDb.OleDbDataAdapter

Dim test As Int16

'TestConnection()

Console.WriteLine("Test")

Debug.WriteLine("Test")

WriteLine("test")

Try

Dim sql$ = "SELECT 0 AS Selected,
VendorInventoryTypes.VendorInventoryTypesID, VendorInventoryTypes.Code,
VendorInventoryTypes.Category, VendorInventoryTypes.SubCategory,
VendorInventoryTypes.Brand, VendorInventoryTypes.Model,
VendorInventoryTypes.Description, 0 AS Quantity,
VendorInventoryTypes.RequiresUniqueItems,VendorInv entoryTypes.Cost FROM
(VendorInventoryTypes) WHERE (((VendorInventoryTypes.VendorID)=" &
lclVendorID & "));"

daOrders = mdi.dt.GenericDA(sql)

daOrderDetails = mdi.dt.GenericDA(sql)

daOrders.Fill(dsInventoryTypeOrders, "Orders") ' = mdi.dt.GenericDS(sql)

test = dsInventoryTypeOrders.Tables("Orders").Rows.Count

Dim dr As DataRow

'
Debug.WriteLine(dsInventoryTypeOrders.Tables("TBL" ).Columns.Count.ToString)'

' Debug.WriteLine(dsInventoryTypeOrders.Tables(0).Co lumns.Count.ToString)

For Each dr In dsInventoryTypeOrders.Tables(0).Rows

Debug.WriteLine(dr.Item("Selected").ToString)

Next

Dim dc As DataColumn

dc.AutoIncrement = True

dc.AutoIncrementSeed = -1

dc.AutoIncrementStep = -1

' dc.Unique = True

dc.ColumnName = "GUID"

dsInventoryTypeOrders.Tables(0).Columns.Add(dc)

view1 = New DataView(dsInventoryTypeOrders.Tables("Orders"))


Mar 15 '06 #1
2 1358

That often happens if you don't make a debug build and the symbols file
gets out of sync with the code in the editor.
Rico wrote:
Hello,

I have Visual Studio 2003, working on a VB.net project. When I try to step
through the code, the behavior is erratic, stepping in places where no code
exists, jumping over code sections without any goto lines or anything, and
also, when I try to use WriteLine, Console.Writeline or Debug.Writeline
nothing happens, nothing comes out in the command window. It's driving me
nutz!

Here is a snippet of code that was left with all my test ramblings in it.
To give you an idea of where the debugger jumps, (at one point that I can
recall off hand) it will jump from the first "Next" statement down to the
"dc.AutoIncrementStep = -1" line. From there it hits the next blank line,
then skips the next two lines of code to another blank line, then skips
another two lines of code landing on the "view2 = New
DataView(dsInventoryTypeOrders.Tables("Orders"))" line.

Any help would get GREATLY welcomed, as this is taking its tollon me!

Thanks!

Private Sub LoadData()

Dim daOrders As New OleDb.OleDbDataAdapter

Dim daOrderDetails As New OleDb.OleDbDataAdapter

Dim test As Int16

'TestConnection()

Console.WriteLine("Test")

Debug.WriteLine("Test")

WriteLine("test")

Try

Dim sql$ = "SELECT 0 AS Selected,
VendorInventoryTypes.VendorInventoryTypesID, VendorInventoryTypes.Code,
VendorInventoryTypes.Category, VendorInventoryTypes.SubCategory,
VendorInventoryTypes.Brand, VendorInventoryTypes.Model,
VendorInventoryTypes.Description, 0 AS Quantity,
VendorInventoryTypes.RequiresUniqueItems,VendorInv entoryTypes.Cost FROM
(VendorInventoryTypes) WHERE (((VendorInventoryTypes.VendorID)=" &
lclVendorID & "));"

daOrders = mdi.dt.GenericDA(sql)

daOrderDetails = mdi.dt.GenericDA(sql)

daOrders.Fill(dsInventoryTypeOrders, "Orders") ' = mdi.dt.GenericDS(sql)

test = dsInventoryTypeOrders.Tables("Orders").Rows.Count

Dim dr As DataRow

'
Debug.WriteLine(dsInventoryTypeOrders.Tables("TBL" ).Columns.Count.ToString)'

' Debug.WriteLine(dsInventoryTypeOrders.Tables(0).Co lumns.Count.ToString)

For Each dr In dsInventoryTypeOrders.Tables(0).Rows

Debug.WriteLine(dr.Item("Selected").ToString)

Next

Dim dc As DataColumn

dc.AutoIncrement = True

dc.AutoIncrementSeed = -1

dc.AutoIncrementStep = -1

' dc.Unique = True

dc.ColumnName = "GUID"

dsInventoryTypeOrders.Tables(0).Columns.Add(dc)

view1 = New DataView(dsInventoryTypeOrders.Tables("Orders"))

Mar 15 '06 #2
Thanks John,

I had some other issues as well (Like no help file associated with VS) so
out of frustration I uninstalled and re-installed the whole thing.
Everything seems to be working fine now. (and to think, I spent most of the
day yesterday thinking it was my code) ;)
"John Bailo" <ja*****@texeme.com> wrote in message
news:44**************@texeme.com...

That often happens if you don't make a debug build and the symbols file
gets out of sync with the code in the editor.
Rico wrote:
Hello,

I have Visual Studio 2003, working on a VB.net project. When I try to
step
through the code, the behavior is erratic, stepping in places where no
code
exists, jumping over code sections without any goto lines or anything,
and
also, when I try to use WriteLine, Console.Writeline or Debug.Writeline
nothing happens, nothing comes out in the command window. It's driving
me
nutz!

Here is a snippet of code that was left with all my test ramblings in it.
To give you an idea of where the debugger jumps, (at one point that I can
recall off hand) it will jump from the first "Next" statement down to the
"dc.AutoIncrementStep = -1" line. From there it hits the next blank
line,
then skips the next two lines of code to another blank line, then skips
another two lines of code landing on the "view2 = New
DataView(dsInventoryTypeOrders.Tables("Orders"))" line.

Any help would get GREATLY welcomed, as this is taking its tollon me!

Thanks!

Private Sub LoadData()

Dim daOrders As New OleDb.OleDbDataAdapter

Dim daOrderDetails As New OleDb.OleDbDataAdapter

Dim test As Int16

'TestConnection()

Console.WriteLine("Test")

Debug.WriteLine("Test")

WriteLine("test")

Try

Dim sql$ = "SELECT 0 AS Selected,
VendorInventoryTypes.VendorInventoryTypesID, VendorInventoryTypes.Code,
VendorInventoryTypes.Category, VendorInventoryTypes.SubCategory,
VendorInventoryTypes.Brand, VendorInventoryTypes.Model,
VendorInventoryTypes.Description, 0 AS Quantity,
VendorInventoryTypes.RequiresUniqueItems,VendorInv entoryTypes.Cost FROM
(VendorInventoryTypes) WHERE (((VendorInventoryTypes.VendorID)=" &
lclVendorID & "));"

daOrders = mdi.dt.GenericDA(sql)

daOrderDetails = mdi.dt.GenericDA(sql)

daOrders.Fill(dsInventoryTypeOrders, "Orders") ' = mdi.dt.GenericDS(sql)

test = dsInventoryTypeOrders.Tables("Orders").Rows.Count

Dim dr As DataRow

'
Debug.WriteLine(dsInventoryTypeOrders.Tables("TBL" ).Columns.Count.ToString)'

' Debug.WriteLine(dsInventoryTypeOrders.Tables(0).Co lumns.Count.ToString)

For Each dr In dsInventoryTypeOrders.Tables(0).Rows

Debug.WriteLine(dr.Item("Selected").ToString)

Next

Dim dc As DataColumn

dc.AutoIncrement = True

dc.AutoIncrementSeed = -1

dc.AutoIncrementStep = -1

' dc.Unique = True

dc.ColumnName = "GUID"

dsInventoryTypeOrders.Tables(0).Columns.Add(dc)

view1 = New DataView(dsInventoryTypeOrders.Tables("Orders"))


Mar 15 '06 #3

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

Similar topics

2
by: One's Too Many | last post by:
Ran into a strange problem today: 8.1.7 on AIX 4.3.3 Database and applications had been working fine for two years and all of a sudden a couple of regularly-run queries are now no longer...
3
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
0
by: Rico | last post by:
Hello, I have Visual Studio 2003, working on a VB.net project. When I try to step through the code, the behavior is erratic, stepping in places where no code exists, jumping over code sections...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.