(Sep-05-2019, 02:11 PM)snippsat Wrote: [ -> ]Set "python": "$pythonPath $fullFileName",
In VS-Code version-1.38.0x64 system installed on Windows-10, it is seen that in Settings, while at the item "Code-Runner:Executor Map", clicking the caption "Edit in settings.json" opens the json file without actually showing the contents of Executor Map code block therein.
To get at this content, clicking the gear wheel that appears on left when you hover over "Code-Runner:Executor Map" provides the option to copy on to clipboard, which can then be pasted into json file as desired.
In my case, I have selected Python as default language for Code-Runner and the Executor Map reads as follows:
"code-runner.executorMap": {
"javascript": "node",
"java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
"c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"php": "php",
"python": "python -u",
"perl": "perl",
"perl6": "perl6",
"ruby": "ruby",
"go": "go run",
"lua": "lua",
"groovy": "groovy",
"powershell": "powershell -ExecutionPolicy ByPass -File",
"bat": "cmd /c",
"shellscript": "bash",
"fsharp": "fsi",
"csharp": "scriptcs",
"vbscript": "cscript //Nologo",
"typescript": "ts-node",
"coffeescript": "coffee",
"scala": "scala",
"swift": "swift",
"julia": "julia",
"crystal": "crystal",
"ocaml": "ocaml",
"r": "Rscript",
"applescript": "osascript",
"clojure": "lein exec",
"haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
"rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
"racket": "racket",
"scheme": "csi -script",
"ahk": "autohotkey",
"autoit": "autoit3",
"dart": "dart",
"pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
"d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
"haskell": "runhaskell",
"nim": "nim compile --verbosity:0 --hints:off --run",
"lisp": "sbcl --script",
"kit": "kitc --run"
}
relevant extract from existing json file reads as follows:
"code-runner.clearPreviousOutput": true,
"code-runner.defaultLanguage": "python",
"code-runner.runInTerminal": false,
"code-runner.preserveFocus": false
At present, everything seems o be working fine. Under the circumstances, would you still recommend that the line:
"python": "python -u",
as now shown in Executor Map should be replaced by:
"python": "$pythonPath $fullFileName",
and then the modified Executor Map inserted into the existing json file?