Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how do i get rid of the json error : line 62 char 2 end of file expected

+1 vote
asked Apr 5, 2020 by Yusuf Dadkhah (240 points)

i am working on learning more about json code and how to get rid of the json errors and i am working on perfecting my script, i would like to make a better script. i did do everything i could think of to get rid of the errors without changing the language in visual studios, what is your solution to get rid of the errors?

here is the error message in visual studio:

line 62 char 2 end of file expected

  [1]: https://i.stack.imgur.com/hehay.png

the following json script is used to make the c++ debugger run and is used to enable visual studio to identifiy c++ errors. i am just tweaking it. 

{

     "/Use IntelliSense to learn about possible attributes.":

    ",/ Hover to view descriptions of existing attributes":

    ",/ For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387/"

        "version": "0.2.0",

        "configurations": [

    

            {

                "name": "(gdb) Attach",

                "type": "cppdbg",

                "request": "attach",

                "program": "enter program name, for example ${workspaceFolder}/a.exe",

                "processId": "${command:pickProcess}",

                "MIMode": "gdb",

                "miDebuggerPath": "/path/to/gdb",

                "setupCommands": [

                    {

                        "description": "Enable pretty-printing for gdb",

                        "text": "-enable-pretty-printing",

                        "ignoreFailures": true

                    }

                ]

            },

            {

    "customLaunchSetupCommands": [

        { "text": "target-run", "description": "run target", "ignoreFailures": false }

      ],

      "launchCompleteCommand": "exec-run",

    "windows :gdb"

     :"C:\\MinGw\\bin\\gdb.exe"

      }

    ]

    

                ,"name": "(gdb) Bash on Windows Launch",

                "type": "cppdbg",

                "request": "launch",

                "program": "enter program name, for example ${workspaceFolder}/a.exe",

                "args": [],

                "stopAtEntry": false,

                "cwd": "${workspaceFolder}",

                "environment": [],

                "externalConsole": true,

                "pipeTransport": {

                    "debuggerPath": "/usr/bin/gdb",

                    "pipeProgram": "${env:windir}\\system32\\bash.exe",

                    "pipeArgs": ["-c"],

                    "pipeCwd": ""

                },

                "setupCommands": [

                    {

                        "description": "Enable pretty-printing for gdb",

                        "text": "-enable-pretty-printing",

                        "ignoreFailures": true

                    }

          ],"customLaunchSetupCommands": [

        { "text": "target-run", "description": "run target", "ignoreFailures": false }

      ],

    

      "launchCompleteCommand": "exec-run",

    "windows" : "gdb,"

        ,"miDebuggerPath": "C:\\MinGw\\bin\\gdb.exe"

    line 62 }[ 

    ] 

1 Answer

0 votes
answered Apr 6, 2020 by Yusuf Dadkhah (240 points)
selected Apr 6, 2020 by Yusuf Dadkhah
 
Best answer
remove the brackets at line 62.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...