How can I get line numbers to print
in Visual Studio 2005 when printing code
listings?
Here's how. On the menu bar, choose Tools > Options. Expand the Text Editor node, and then select either the language you're using or All Languages to turn on line numbers in all supported programming languages.
Note: To go to a line in the file, you use ctrl + g, then type a line number. Alternatively, you can also open the go-to file menu with command + p first. Then type : . Then type your line number.
Simply install the extension within VS Code or by going to the Visual Studio Marketplace. Next restart VS Code. Open the code you'd like to print, press F1 and type PrintCode and press enter.
Isn't there an option in the Print Dialog?
Edit: There is. Go to File => Print, and then in the bottom left there is "Print what" and then "Include line Numbers"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With