473,662 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4581
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*******@cinc i.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.WriteLi ne("{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(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
Dim inputln As String
'Dim riou As New Regex("^(?<numr tr>\d+\.\d+[eE]?
[+ -]?(\d+)?.+?<dent r>\d+\.\d+[eE]?\d+[:Wh]+(?
<outunits>.+$" , _
' RegexOptions.Co mpiled)
Dim riou As New Regex("^(?<numr tr>\d+\.\d+[eE]?
[+ -]?(\d+)?.+?<dent r>\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_co unt(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.OpenO rCreate, FileAccess.Read Write,
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(FIL E_NAME) Then
' Console.WriteLi ne("{0} does not exist! Using
Default Units.", FILE_NAME)
' MsgBox(FILE_NAM E & " does not exist !")
' GoTo LastLine
' End If
' sr = File.OpenRead(F ILE_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*******@cinc i.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*******@cinc i.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*******@cinc i.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*******@cinc i.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
2036
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 source code tracking is extremely useful for recursive functions. I have spent time Googling but not found anything near. Thanks!
2
1368
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 the debugger will break execution on line 92 in another source file. I've tried doing a clean build and I've tried remaking my project files. Does anyone have information on how the debugger links source files to object files?
25
4295
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 cost way to do sophisticated debugging in IE6 other than to use the debugger described below, which is horribly documented otherwise. I feel debugging is an important aspect of projecting the useability of the language and needs to be made more...
6
3363
by: Fatih BOY | last post by:
Does anyone known a free debugger for c# with the source code!?
4
1654
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 evaluation tooltips while debugging. Here is the basic code to use for debugging and to illustrate this "problem.": //--- start code
1
2008
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 Debug-IDE) without re-compiling it. DbgCLR.exe recognizes that something has changed in the source file and pops up a warning dialog asking if the new source should be used. If I click "yes" and re-start the debugging process from the beginning...
18
2957
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 perldb) or "run" (gdb) command. I was pleasantly pleased discover how easy though it was patch pdb.py and pdb.doc; my patch for this is here: http://sourceforge.net/tracker/index.php?func=detail&aid=1393667&group_id=5470&atid=305470
4
1858
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 debugger (Insight debugger, which is a GUI front-end to GDB version 5.3). In fact, when I try to view the header file, all I see is assembly language. There is another header file in the same directory, which does not have any inline member...
20
2631
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++ (on the clinet's machine)? Is this possible at all? Thanks. WJ
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8856
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.