By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,065 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,065 IT Pros & Developers. It's quick & easy.

Line numbering in VB.Net-- done behind the scenes for you?

P: n/a
Hi all,

In VB6 I used a 3rd party tool for line numbering my source code, to
help with debugging. However, in experimenting with VB .Net I've noticed
that my exceptions automatically provide line numbers, with no effort
required from me. Is this a standard offering in .Net, or is rolling your
own line numbers still the way to go? Also, my components at the moment are
being compiled in debug mode. Will line numbers still be available in my
exceptions when I build in release mode?-- just checking. Thanks.

-Jim
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Yup, VB.Net knows what line is what.
Check out this snip from the help file:
Displaying Line Numbers
You can turn on line numbering in your code. Line numbers are useful for, for
example, Navigating Code and Text.

Note Turning on line numbering does not mean that the document will print
with line numbers. For line numbers to print, you must select the Line numbers
check box in the Page Setup command on the File menu.
To display line numbers in code

1.. Select Options from the Tools menu.
2.. On the Text Editor node, choose All Languages.
3.. In the Display group box on the General node, click Line Numbers.
4.. To select this option on a programming language basis, select Line Numbers
in the appropriate folder. For example, to set line numbers for Visual Basic
..NET, select Line Numbers in the Display group box in the Basic node.

Gerald

"Jim Bancroft" <bo********@nowhere.com> wrote in message
news:eS****************@TK2MSFTNGP10.phx.gbl...
Hi all,

In VB6 I used a 3rd party tool for line numbering my source code, to
help with debugging. However, in experimenting with VB .Net I've noticed
that my exceptions automatically provide line numbers, with no effort
required from me. Is this a standard offering in .Net, or is rolling your
own line numbers still the way to go? Also, my components at the moment are
being compiled in debug mode. Will line numbers still be available in my
exceptions when I build in release mode?-- just checking. Thanks.

-Jim

Nov 21 '05 #2

P: n/a
* "Jim Bancroft" <bo********@nowhere.com> scripsit:
In VB6 I used a 3rd party tool for line numbering my source code, to
help with debugging. However, in experimenting with VB .Net I've noticed
that my exceptions automatically provide line numbers, with no effort
required from me. Is this a standard offering in .Net, or is rolling your
own line numbers still the way to go?


Yes, if you are running a debug build, no for release builds without PDB
file.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3

P: n/a
Thanks!

-Jim
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.