#๐Ÿ”’ "console": "internalConsole" not sticking after closing file

17 messages ยท Page 1 of 1 (latest)

modest temple
#

Hello,

I'm going through the opening chapters of Eric Matthes' "Python Crash Course (3rd Ed)", and its recommendation for simplifiying the output of my code doesn't seem to be sticking for me. He recommends adding a launch.json file to the folder in which my Python work is sitting in, and switch "console": integratedTerminal" to "internalConsole", which (seemingly) hides the lengthy output of paths my HelloWorld program is pulling from, and leaves just the output. This does work... once, and then reverts to spitting out the full output after the program has been closed and reopened. I do make sure to save before closing out, and deleting the launch.json file and recreating it just duplicates the problem. Thank you in advance!

Here's his accompanying github page where he gives the instructions for this (although in the textbook, he also includes "justMyCode": true beneath "console")
https://ehmatthes.github.io/pcc_3e/setup_instructions/configuring_vs_code/

Here's my launch.json file:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Python Debugger: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "internalConsole"
        }
    ]
}

And my very long, elaborate Hello World:
print("Hello Python world!")

grand graniteBOT
#

@modest temple

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

scarlet willow
#

At this point I have two objections.

  1. none of that has anything to do with Python itself. It has to do with your IDE, the program you are using to create the Python code files. (from the URL, it sounds like the program you're using is VS Code โ€” a popular choice.)
    You don't need any specific program for that. You can make them any way that you would make a plain text file. The important thing for a program is the text itself.

  2. It doesn't seem that you ask a question. What exactly is wrong about what happens, and what do you want to happen differently?

modest temple
scarlet willow
#

okay, so "every time" means when you open the project?

scarlet willow
#
  1. Did you check the launch.json file after closing the project? Did it change somehow?

  2. What if you leave the launch.json file alone, but you close and restart VS Code completely?

modest temple
scarlet willow
#

and the "result", I take it, is that the Terminal tab is selected, and it shows the program output mixed with terminal commands?

#

Does anything show in the Debug Console tab, if you click there?

modest temple
scarlet willow
modest temple
scarlet willow
#

seems worth a shot. I'm afraid I don't know anything about VS Code; I just know how to troubleshoot problems.

grand graniteBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.