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

Line numbering tools

P: n/a
J L
Are there any free add-ins for VB.Net that will add and remove line
numbers from the source code?

TIA
John
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
John,

I'm not sure, do you just want to have a sepertae file with some source code
that includes line numbers? If so, copy/paste the code into an excel
spreadsheet (Column B), then fill Column A from 1 to however many lines
there are.

If you just want to see line numbers in VB.NET, go to options, select Text
Editor, select Visual Basic, and check the Line Numbers box.

Cheers,
Lee

"J L" <jo**@marymonte.com> wrote in message
news:r3********************************@4ax.com...
Are there any free add-ins for VB.Net that will add and remove line
numbers from the source code?

TIA
John

Nov 21 '05 #2

P: n/a
J L
I may be confused but it seems that you have to include the line
numbers in your souce code if you want to reference them in an error
handler. Is that correct? If so, then I want to add error numbers
prior to my final build. I used to use a tool to do that in VB6 and it
worked great.

I do understand about viewing the line numbers in the IDE and I do use
that.

As an aside, how does VB know the line number at run time? Does it
require a larger EXE or something?

TIA,
John

On Tue, 15 Mar 2005 07:40:06 +0800, "lgbjr" <lg***@online.nospam>
wrote:
John,

I'm not sure, do you just want to have a sepertae file with some source code
that includes line numbers? If so, copy/paste the code into an excel
spreadsheet (Column B), then fill Column A from 1 to however many lines
there are.

If you just want to see line numbers in VB.NET, go to options, select Text
Editor, select Visual Basic, and check the Line Numbers box.

Cheers,
Lee

"J L" <jo**@marymonte.com> wrote in message
news:r3********************************@4ax.com.. .
Are there any free add-ins for VB.Net that will add and remove line
numbers from the source code?

TIA
John


Nov 21 '05 #3

P: n/a
J L
A followup:

I see that if I run in Debug mode, the source line is picked up in the
StackTrace but no if I use Release mode. So I guess that means I could
build my projects all in Debug mode just to get the line number? This
is really a big issue to me. In VB6, when a customer had a problem I
was able to nail it down to a specfic line and that saved lots of time
and headaches...seems we should be able to do that in .Net too.

John

On Tue, 15 Mar 2005 07:40:06 +0800, "lgbjr" <lg***@online.nospam>
wrote:
John,

I'm not sure, do you just want to have a sepertae file with some source code
that includes line numbers? If so, copy/paste the code into an excel
spreadsheet (Column B), then fill Column A from 1 to however many lines
there are.

If you just want to see line numbers in VB.NET, go to options, select Text
Editor, select Visual Basic, and check the Line Numbers box.

Cheers,
Lee

"J L" <jo**@marymonte.com> wrote in message
news:r3********************************@4ax.com.. .
Are there any free add-ins for VB.Net that will add and remove line
numbers from the source code?

TIA
John


Nov 21 '05 #4

P: n/a
>I may be confused but it seems that you have to include the line
numbers in your souce code if you want to reference them in an error
handler. Is that correct?
You should avoid line numbers in .NET for error handlers. That was used in
VB6 using the undocumented Erl function. In .NET you should use exception
handlers. In Debug configuration the exception will tell the file and line,
but not in Release configuration (no .pdb file is generated). In Release
configuration you only get the class/procedure name, but if you use
procedures as short as possible (a good programming practice), knowing the
exception you can easily guess what statement failed. If not, most
exceptions should be reproducible on your side after being reported by the
user, because otherwise it is somewhat risky to try to fix them without
knowing the implications.

If so, then I want to add error numbers prior to my final build.
I used to use a tool to do that in VB6 and it worked great.


MZ-Tools, by chance?

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com


Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.