Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Stata4VSNew to Visual Studio Code? Get it now.
Stata4VS

Stata4VS

Juan Imbet

|
302 installs
| (1) | Free
Creates a temporal do file to be ran from Stata. Mimics the Shft+D command
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

stata4vs README

Simple extension to help run Stata from VS Code. The extension creates a temp.do file in the current directory which can be ran directly from Stata with the do command. This is useful to use GitHub's copilot and Stata syntax highlighting to write Stata code.

This is a very simple extension that I created to help me run Stata from VS Code. Any suggestions are welcome at jfimbett@gmail.com

Instructions

  • Open a Stata file in VS Code
  • Open an instance of Stata
  • Make sure the current directory in Stata is the same as the directory of the file you are working on in VS Code.
  • Select the text you want to run in Stata
  • Press Ctrl+Alt+P and select Create Do File
  • Run the do file in Stata with do temp.do

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft