Jump to content

Open Visual Studio Code to specific line


Josh
 Share

Recommended Posts

I'm just making some notes here. This is how to open VSCode with a specific file and line:

Quote

code -g "C:\Users\(USERNAME)\Documents\Leadwerks\Projects\MyGame\Scripts\Main.lua:6"

And to also open a folder:

Quote

code -g "C:\Users\(USERNAME)\Documents\Leadwerks\Projects\MyGame\Scripts\Main.lua:6" +folder "C:\Users\(USERNAME)\Documents\Leadwerks\Projects\MyGame\Scripts"

To add a specific character in the line:

Quote

code -g "C:\Users\(USERNAME)\Documents\Leadwerks\Projects\MyGame\Scripts\Main.lua:6:10" +folder "C:\Users\(USERNAME)\Documents\Leadwerks\Projects\MyGame\Scripts"

 

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...