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

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.


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.

Tags:

Ide

Vb6