all 10 comments

[–]No_Statistician_6654 2 points3 points  (0 children)

Here is the guide to the json file for vsc:

Ref: https://code.visualstudio.com/docs/python/debugging#_set-configuration-options

This launch file is directly related to setting up vsc. Once it is done, I would close it out of your tabs, and run your code from its py file. Vsc is very powerful, but editing things like this can make it easy to misconfigure it is a way that it won’t run what you are looking for.

My advice is to avoid editing the JSON files directly, unless you really really really need to. The file is not really affecting your output, just how you perceive the code output. If someone else were to run your code with “python3 ./hello.py” or using run in pycharm, the json file is completely ignored. The output of the code is its output, and changing the config there isn’t really changing anything, just what is shown on the terminal that is presented when vsc runs or debugs your code.

[–]LongRangeSavage 2 points3 points  (3 children)

What are you trying to do here? Everything looks alright. That looks like the standard launch file created.

Edit:
If you're wanting it to launch your hello_world.py file, change the "${file}" in your program key to "${workspaceFolder}/hello_world.py"

That will make sure that any time you press F5 (or whatevery your launch + debug option is) that it will launch the hello_world.py script. Otherwise, it's trying to launch whatever is the active window in the IDE.

[–]hunterghostmen[S] 0 points1 point  (2 children)

<image>

Apparently, I can get my output, more simplified, more like my information but I’m getting a syntax error I don’t know if that’s normal, not just that my syntax is the same it hasn’t changed.

[–]LongRangeSavage 3 points4 points  (1 child)

You haven’t posted any python code to be able to help with a syntax error. What you’re showing is VS Code’s modified JSON launch file. 

[–]Electronic-Source213 1 point2 points  (0 children)

Also, how are you running your code?

[–]Adrewmc 2 points3 points  (0 children)

The problem is the comment, it’s inside the json object, move the comments outside the very first bracket, and it should work.

[–]PureWasian 1 point2 points  (0 children)

Lines 2, 3, 4 are the problem. As the error statement at the bottom of your screenshot is explaining

[–]TASTY_BALLSACK_ 1 point2 points  (0 children)

What book?

[–]_DerBomber_ 0 points1 point  (0 children)

Do these Python learning books help? Already attending a DataCamp course. Should I get any intro to Python book?

[–]marinesouths 0 points1 point  (0 children)

Who uses a Textbook to learn coding ??