Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to display line numbers in the VB6 / Visual Studio 6.0 IDE?

Tags:

ide

vb6

In the VB6 / Visual Studio 6.0 IDE, is there a way to display line numbers in the code editor like there is in recent versions of Visual Studio .NET?

For example, I would like to ask someone a question about their code and be able to say "In lines 10 through 13 of your MyClass.bas file, I noticed this happened."

like image 649
Ben McCormack Avatar asked Mar 01 '10 20:03

Ben McCormack


People also ask

How do you find the line number in a visual code?

You can press Ctrl + G . A prompt will then ask you what line number to go to.

How do I toggle line numbers in Vscode?

On vscode, press Ctrl-Shift-P, and type user settings . Click on Preferences: Open User settings . in the settings search bar, type in line numbers . Then, on the Editor: Line Numbers: Controls the display of line numbers. , switch that to on if it isn't already.


2 Answers

Not that I know of. However, if you look at the toolbar when you have a code editor window open, there is a section that tells you the current line and column number the cursor is on:

enter image description here

Another possibility is to write an add-in for the IDE that can quickly highlight a range of lines. It's been awhile, but I'm pretty sure that the IDE's extensibility API lets you programmatically highlight sections of code in a code editor window.

like image 127
Mike Spross Avatar answered Oct 18 '22 13:10

Mike Spross


This answer is not quite what you were asking, but I think it may still be useful / pertinent for people reading this question.

If you install the MZTools add-in to VB6, it has the ability to add line numbers in code to each line of each procedure / function / sub / etc.

This can be invaluable when trying to capture error information and you want to record the exact line number where the error originated at runtime. This is not needed in the IDE, but is very useful when trying to debug a compiled component in the field.


Edit: MZ Tools used to have a free version 3, which seems to no longer be available. But it worked well.

like image 43
StayOnTarget Avatar answered Oct 18 '22 13:10

StayOnTarget