question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

command to open file at line number

See original GitHub issue

suggested by @jkaster

Currently a file can be opened in an existing window: #1994

VS Code itself supports opening a file with line number with the -g (goto?) flag (see microsoft/vscode#39891):

code -g file.txt:4
# works :)

code-server -r -g file.txt:4
# error Unknown option -g

It would probably make sense to reuse this schema.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

3reactions
AndrewChe7commented, Aug 12, 2022

It would be great if this feature will be implemented. There was already lots of requests, but it wasn’t implemented yet. #1292 and #2179 was closed.

1reaction
jkastercommented, Oct 11, 2021

I hope this gets implemented some day, since it was deemed relatively easy and it would be great for integration

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vim Open File And Go To Specific Function or Line Number
The Vim goto line number command. One can use the G letter. For example, press [ESC] key and type 10G (Shift-g) goto line...
Read more >
linux - How can I open a file with line numbers displayed from ...
You can use: vi +"set number" your_file.
Read more >
Going to a specific line number using Less in Unix
To open at a specific line straight from the command line, use: ... This will open a file displaying the line numbers and...
Read more >
How to Open File at a Specific Line Number in Notepad++
Here's how you can directly open a file at a specific line number in Notepad++ when launched from the command line or via...
Read more >
Opening a file from command line with line number (--goto) is ...
Try to open it with code with a specific line number, such as code test.txt:3. Expected behavior: Code opens test.txt and places cursor...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found