Python Forum
A trouble with VS Code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A trouble with VS Code
#18
(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?
A.D.Tejpal
Reply


Messages In This Thread
A trouble with VS Code - by Truman - Sep-01-2019, 11:41 PM
RE: A trouble with VS Code - by Larz60+ - Sep-02-2019, 04:23 AM
RE: A trouble with VS Code - by Truman - Sep-02-2019, 03:36 PM
RE: A trouble with VS Code - by Truman - Sep-03-2019, 08:02 PM
RE: A trouble with VS Code - by Larz60+ - Sep-04-2019, 10:24 PM
RE: A trouble with VS Code - by Truman - Sep-04-2019, 11:14 PM
RE: A trouble with VS Code - by Larz60+ - Sep-05-2019, 03:36 AM
RE: A trouble with VS Code - by snippsat - Sep-05-2019, 12:02 PM
RE: A trouble with VS Code - by Truman - Sep-05-2019, 12:31 PM
RE: A trouble with VS Code - by perfringo - Sep-05-2019, 12:48 PM
RE: A trouble with VS Code - by snippsat - Sep-05-2019, 02:11 PM
RE: A trouble with VS Code - by Larz60+ - Sep-05-2019, 02:13 PM
RE: A trouble with VS Code - by Truman - Sep-05-2019, 02:53 PM
RE: A trouble with VS Code - by snippsat - Sep-05-2019, 04:02 PM
RE: A trouble with VS Code - by Truman - Sep-05-2019, 04:52 PM
RE: A trouble with VS Code - by snippsat - Sep-05-2019, 05:21 PM
RE: A trouble with VS Code - by Truman - Sep-05-2019, 05:27 PM
RE: A trouble with VS Code - by adt - Sep-08-2019, 03:58 PM
RE: A trouble with VS Code - by snippsat - Sep-09-2019, 05:40 AM
RE: A trouble with VS Code - by adt - Sep-09-2019, 08:34 AM
RE: A trouble with VS Code - by snippsat - Sep-09-2019, 12:22 PM
RE: A trouble with VS Code - by adt - Sep-09-2019, 04:03 PM
RE: A trouble with VS Code - by snippsat - Sep-09-2019, 09:50 PM
RE: A trouble with VS Code - by Truman - Sep-21-2019, 10:05 PM
RE: A trouble with VS Code - by Truman - Sep-25-2019, 10:23 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020