在vs Code 中编辑和调试Stata程序
主要步骤
RunStataInVSCodeSnip.png需要注意的问题
-
do文件的对应的执行路径设置射中文件,添加如下代码。".do": "C:\Dropbox\YY_LL\GreenSoftware\stataTool\rundo51\rundo.exe",。
"code-runner.executorMapByFileExtension": { ".do": "C:\\Dropbox\\YY_LL\\GreenSoftware\\stataTool\\rundo51\\rundo.exe", ".vb": "cd $dir && vbc /nologo $fileName && $dir$fileNameWithoutExt", ".vbs": "cscript //Nologo", ".scala": "scala", ".jl": "julia", ".cr": "crystal", ".ml": "ocaml", ".exs": "elixir", ".hx": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt", ".rkt": "racket", ".ahk": "autohotkey", ".au3": "autoit3", ".kt": "cd $dir && kotlinc $fileName -include-runtime -d $fileNameWithoutExt.jar && java -jar $fileNameWithoutExt.jar", ".kts": "kotlinc -script", ".dart": "dart", ".pas": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt", ".pp": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt", ".d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt", ".hs": "runhaskell", ".nim": "nim compile --verbosity:0 --hints:off --run", ".csproj": "dotnet run --project", ".fsproj": "dotnet run --project", ".lisp": "sbcl --script" }, "code-runner.customCommand": "C:\\Dropbox\\YY_LL\\GreenSoftware\\stataTool\\rundolines51\\rundolines.exe", "stataRun.advancePosition": false
其中最后一行 "stataRun.advancePosition": false是因为VSCode总Stata-Run插件和Code-runner插件貌似有冲突。
-
安装完成后需要重启
-
rundo和rundolines的安装和设置可能出现较多问题。请仔细参考脚注[^1]的提示说明。
主要参考文献
脚注
[^1] https://huebler.blogspot.com/2008/04/stata.html
[^2]https://caiskdbk.wordpress.com/2018/04/05/来篇干货%EF%BC%9A使用vscode当作stata编辑器/
网友评论