LoginSignup
nama40024
@nama40024

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

VS Codeの拡張機能「Code Runner」にコマンドを追加する方法

解決したいこと

https://seiseiengineering.com/atcoder%E3%81%AEc%E7%92%B0%E5%A2%83%E6%A7%8B%E7%AF%89-vscodewsl2%E3%81%A7%E5%BF%AB%E9%81%A9%E3%81%AB%EF%BC%81/
こちらのサイトを参考にCode Runnerにコマンドを追加を追加しようとしましたが、エラーが出てしまいます。jsonに詳しい方、code runner経験者の方、よろしくお願いします、

発生している問題・エラー

End of file expected.

該当するソースコード

{
    "python.defaultInterpreterPath": "C:\\Users\\MyUserName{Fake}\\AppData\\Local\\Programs\\Python\\Python311\\python.exe",
    "code-runner.runInTerminal": true,
    "cmake.configureOnOpen": true,
    "debug.onTaskErrors": "debugAnyway"

}
{
    "command-runner.commands": {
        "oj test": "oj test -c ${fileDirname}/a.out -d ${fileDirname}/tests",
        "acc submit": "cd ${fileDirname} && acc submit ${file} || cd ../../",
    }
}

0

1Answer

{
    "python.defaultInterpreterPath": "C:\\Users\\MyUserName{Fake}\\AppData\\Local\\Programs\\Python\\Python311\\python.exe",
    "code-runner.runInTerminal": true,
    "cmake.configureOnOpen": true,
    "debug.onTaskErrors": "debugAnyway",
    "command-runner.commands": {
        "oj test": "oj test -c ${fileDirname}/a.out -d ${fileDirname}/tests",
        "acc submit": "cd ${fileDirname} && acc submit ${file} || cd ../../",
    }
}

{
}
はトップレベルに1個だけにしましょう

0

Comments

  1. @nama40024

    Questioner

    ありがとうございます。{}は修正しましたが、Expected comma?というエラーが出てしまいました。どうすればよいでしょうか?

  2. @nama40024

    Questioner

    すみません。こちら解決しました。ありがとうございます。

  3. 差し出がましいですが、ささいなことであっても「どうやって解決したのか」を書いていると同じように困ってここを見つけた人に喜ばれます。
    あとステータスはクローズに。

Your answer might help someone💌