Skip to content

JSON object parsing "problem" in launch.json #10456

@BorisPolonsky

Description

@BorisPolonsky

Issue Type: Bug

  • Create the ill-foramted json object in launch.json as below:
{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Test training",
            "type": "python",
            "request": "launch",
            "program": "${cwd}/main.py",
            "console": "integratedTerminal",
            "env":{
                "LANG": "C.UTF-8"
            },
            "args": [
                "--mode", "train"
                "--data-dir", "./data/msg",
                "--output-dir", "./tmp_output",
                "--dataset", "some_dataset"
            ]
        }
    ]
}

(Note that a comma is missing after "train",, which means that the json object is invalid. I verify this with json.loads in python and got the following error: json.decoder.JSONDecodeError: Expecting ',' delimiter: line 16 column 17 (char 388))

  • Execute the debugger

The debugging process runs without problem, instead of failing due to json parsing error. The args for debugger turn out to be correct too, given the terminal output like

root@10d189da27e6:/home/polonsky/Documents/EntityRelationExtraction# cd /home/polonsky/Documents/EntityRelationExtraction ; env LANG=C.UTF-8 PYTHONIOENCODING=UTF-8 PYTHONUNBUFFERED=1 /usr/bin/python3 /root/.vscode-server/extensions/ms-python.python-2020.2.64397/pythonFiles/ptvsd_launcher.py --default --client --host localhost --port 44049 /home/polonsky/Documents/EntityRelationExtraction/main.py --mode train --data-dir ./data/msg --output-dir ./tmp_output --dataset some_dataset

Please veryfy if this is a bug or some auto-correction feature.

Extension version: 2020.2.64397
VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:50:36.977Z)
OS version: Linux x64 5.3.0-40-generic snap
Remote OS version: Linux x64 5.3.0-40-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz (4 x 3100)
GPU Status 2d_canvas: unavailable_software
flash_3d: disabled_software
flash_stage3d: disabled_software
flash_stage3d_baseline: disabled_software
gpu_compositing: disabled_software
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: disabled_off
rasterization: disabled_software
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: disabled_software
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
Load (avg) 2, 2, 1
Memory (System) 7.66GB (1.23GB free)
Process Argv --force-user-env --no-sandbox --unity-launch --no-sandbox
Screen Reader no
VM 0%
Item Value
Remote Container tensorflow/tensorflow:1.15.2-…
OS Linux x64 5.3.0-40-generic
CPUs Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz (4 x 3100)
Memory (System) 7.66GB (1.23GB free)
VM 0%

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions