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

vb.net debugger - view source

Help,

I have vb.net std 2002, have a windows forms app and am
debugging code behind it. I think I am viewing the
source, I set the project to debug (as opposed to
release), I start the debugger, it stops at a breakpoint.

But as I step through, it stops on what appear to be
comment lines. It seems I am not looking at the code
line for line as it is being executed (I expect comments
to be skipped). Cannot figure out how to look at the
real source as it is being executed.

I think it used to work, but now does not seem to. Not
sure what I did ?

Any help would be greatly appreciate.
Nov 20 '05 #1
6 4559
Could you give us some information about how to reproduce your problem?

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit
"bob lambert" <na*******@cinci.rr.com> wrote in message
news:01****************************@phx.gbl...
Help,

I have vb.net std 2002, have a windows forms app and am
debugging code behind it. I think I am viewing the
source, I set the project to debug (as opposed to
release), I start the debugger, it stops at a breakpoint.

But as I step through, it stops on what appear to be
comment lines. It seems I am not looking at the code
line for line as it is being executed (I expect comments
to be skipped). Cannot figure out how to look at the
real source as it is being executed.

I think it used to work, but now does not seem to. Not
sure what I did ?

Any help would be greatly appreciate.

Nov 20 '05 #2
bob
You know what, I think I had another problem that needs
addressing first.

If I am in debug mode, and I select debug/start, will
that not compile and launch debugger ?

I guess I was not really getting the code compiled and it
was using an existing exe.

I selected build solution and no problems apparent in
output, but it was not building what I expected (not
really sure what the heck it was building !) I tried
build and my program name, then it found problems, I
fixed them and when I launch debugger, it looks like its
working ok now.

Wish I knew what the heck I did. What is build solution
compared to build my application name ?
Bob

-----Original Message-----
I will try.

I just have a simple form that does calculations when you input values and push buttons. One thing I am trying to
do is open and read a file when the form opens. So I
have a Private Sub Form1_Load subroutine. The code looks
like below ...

anyway it seems to go ok walking to the line
RBAirspeedMach.Checked = True

then it walks through some of the comments as if it was
executing them. I notice in the debug window that it is
actually performing the sr.Readline() but the pointer is
on the comment line

' Console.WriteLine("{0} ....

So I cannot really keep track of what line is executing.

Another queer thing. Its just read a line from the file
and displays the line in the debug window, so I think the sr.Readline() executed. But when I put the mouse over
the variable inputln it shows me

Dim inputln As String

Whats up with that ?
Thanks for any help again

Bob
code snippet
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim inputln As String
'Dim riou As New Regex("^(?<numrtr>\d+\.\d+[eE]?
[+ -]?(\d+)?.+?<dentr>\d+\.\d+[eE]?\d+[:Wh]+(?
<outunits>.+$", _
' RegexOptions.Compiled)
Dim riou As New Regex("^(?<numrtr>\d+\.\d+[eE]?
[+ -]?(\d+)?.+?<dentr>\d+\.\d+[eE]?\d+[:Wh]+(?
<outunits>.+$")
Dim ipmode As String
Dim count_hi, count_speed, count_alt, count_ram,
count_temp As Integer
Dim units_typ_io_count(4, 2, 0) As Double
' open file if exists, create if not, for
read/write, allow others only read while open
Dim fs As New FileStream(FILE_NAME,
FileMode.OpenOrCreate, FileAccess.ReadWrite,
FileShare.Read)
fs.Close()
Dim sr As New StreamReader(fs)
' set defaults
RBAltitudeFeet.Checked = True
RBAirspeedMach.Checked = True
' overload units conversion file data if it
exists and is readable
' file expected in same dir as where the exe is
located
' should not need snippet below. the fs line
above should create if does
' not exist
' If Not File.Exists(FILE_NAME) Then
' Console.WriteLine("{0} does not exist! Using
Default Units.", FILE_NAME)
' MsgBox(FILE_NAME & " does not exist !")
' GoTo LastLine
' End If
' sr = File.OpenRead(FILE_NAME)
inputln = sr.ReadLine()
While Not inputln Is Nothing
' while not eof - is above appropriate check ? ' end of input stream should return nothing
' but what about a blank line ?
....
-----Original Message-----
Could you give us some information about how to

reproduce your problem?

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit
"bob lambert" <na*******@cinci.rr.com> wrote in message
news:01****************************@phx.gbl...
Help,

I have vb.net std 2002, have a windows forms app and am debugging code behind it. I think I am viewing the
source, I set the project to debug (as opposed to
release), I start the debugger, it stops at a breakpoint.
But as I step through, it stops on what appear to be
comment lines. It seems I am not looking at the code
line for line as it is being executed (I expect comments to be skipped). Cannot figure out how to look at the
real source as it is being executed.

I think it used to work, but now does not seem to. Not sure what I did ?

Any help would be greatly appreciate.

.

.

Nov 20 '05 #3
I think you are right when you say you are debugging an older executable
than your current source code.
Check your configurations for a Debug build in the Configuration Manager.

Build --> Configuration Manager --> drop down "Debug" in Active
Configuration and check that each project is set to a Debug build and is
checked to be built.
(I know it seems kind of redundant if you have only one project in the
solution)

--
Shayne H
Nov 20 '05 #4
Hello,

"bob" <na*******@cinci.rr.com> schrieb:
You know what, I think I had another problem that needs
addressing first.

If I am in debug mode, and I select debug/start, will
that not compile and launch debugger ?

I guess I was not really getting the code compiled and it
was using an existing exe.


Delete the "bin" and "obj" folders in your project's folder and try again.

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 20 '05 #5
bob
To shaynes point, I was configured in debug on all
projects (previous response back to me).

In my project bin folder there is some stuff for line
controls that I added in which were downloaded from the
net. Think I got them from you Herfried. Also, I have
an input file that my program will read in that directory
and its the only copy, so I cannot arbitrarily delete the
directory w/o having other negative consequences. (will
I have to re link the line control stuff ?)

What is your point about removing the folders ? To force
recompile of the target code ? I should only need delete
the exe I would think ?

I guess the real question is I don't understand the
difference between Build/Build Solution, Build/Rebuild
Solution and Build/Build (my project), Build/Rebuild (my
project).

Bob
-----Original Message-----
Hello,

"bob" <na*******@cinci.rr.com> schrieb:
You know what, I think I had another problem that needs
addressing first.

If I am in debug mode, and I select debug/start, will
that not compile and launch debugger ?

I guess I was not really getting the code compiled and itwas using an existing exe.
Delete the "bin" and "obj" folders in your project's

folder and try again.
Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
.

Nov 20 '05 #6
Hello,

"bob" <na*******@cinci.rr.com> schrieb:
and its the only copy, so I cannot arbitrarily delete the
directory w/o having other negative consequences. (will
I have to re link the line control stuff ?)


Did you _add_ the Line control project to your solution or did you reference
the DLL? I would suggest to make a backup of both, the obj and the bin
folders and then kill the obj folder and delete the EXE from the bin folder.
After doing that, make a fresh build and try again.

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 20 '05 #7

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

Similar topics

6
by: Tran Tuan Anh | last post by:
Hi all, I am new to Python and desperated to look for a good Python debugger. I mean a debugger with source coding tracking. For C/C++, emacs and gud offers execellent development env. The...
2
by: dbrans | last post by:
Hi There, Somehow the visual studio debugger is getting confused about which source files belong to which object files. For example, I'll set a breakpoint on line 92 in once source file, but...
25
by: Jeff | last post by:
Use the MS Script Editor included free with MS Office 2002 and above, for debugging Internet Explorer (IE). This subject is of great interest to many JS developers, as there is no obvious, low...
6
by: Fatih BOY | last post by:
Does anyone known a free debugger for c# with the source code!?
4
by: Jason | last post by:
This is an offshoot of my post "c# XOR equals (^=) bug?". While I was working on the code for that problem, I think I found a problem with the VS.NET debugger. That has to do with the quick...
1
by: Keith Clark | last post by:
When I load a csharp program into the MS DbgCLR.exe debugger and trace it everything is fine the first time. Assume now, I change somewhere a code statement in the source file (outside the...
18
by: R. Bernstein | last post by:
Okay, a bit of an exaggeration. Recently, I've been using Python more seriously, and in using the debugger I think one of the first things I noticed was that there is no "restart" ("R" in...
4
by: Generic Usenet Account | last post by:
In our environment we have several C++ header files that have some inline member function definitions. For some reason, I am unable to step through the source code of those member functions in my...
20
by: =?Utf-8?B?V0o=?= | last post by:
I have a VC++ application that just crashes on one tester/client's machine. It runs fine everywhere else. What are the other options to debug (on the client's machine) without installing VC++...
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...
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...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.