VScode starts debugging in integrated terminal instead of debug console












13















I've been using vscode for quite some time and just today I started having this strange issue. Previously if I started debugging an program (F5) it would start debugging and show output in the "Debug Console"
enter image description here



But now It starts debugger in the "Terminal" and also outputs to "Debug Console"
I want output only in the "Debug Console" ( Previously default behavior)
enter image description here
Please help me with setting it back to the way it was



{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}"
}

]}


launch.json










share|improve this question

























  • Please add the configuration of your launch.json that you start when you press F5.

    – HaaLeo
    Mar 30 '18 at 10:37













  • @HaaLeo edited.

    – HaMAD
    Mar 30 '18 at 10:40
















13















I've been using vscode for quite some time and just today I started having this strange issue. Previously if I started debugging an program (F5) it would start debugging and show output in the "Debug Console"
enter image description here



But now It starts debugger in the "Terminal" and also outputs to "Debug Console"
I want output only in the "Debug Console" ( Previously default behavior)
enter image description here
Please help me with setting it back to the way it was



{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}"
}

]}


launch.json










share|improve this question

























  • Please add the configuration of your launch.json that you start when you press F5.

    – HaaLeo
    Mar 30 '18 at 10:37













  • @HaaLeo edited.

    – HaMAD
    Mar 30 '18 at 10:40














13












13








13


4






I've been using vscode for quite some time and just today I started having this strange issue. Previously if I started debugging an program (F5) it would start debugging and show output in the "Debug Console"
enter image description here



But now It starts debugger in the "Terminal" and also outputs to "Debug Console"
I want output only in the "Debug Console" ( Previously default behavior)
enter image description here
Please help me with setting it back to the way it was



{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}"
}

]}


launch.json










share|improve this question
















I've been using vscode for quite some time and just today I started having this strange issue. Previously if I started debugging an program (F5) it would start debugging and show output in the "Debug Console"
enter image description here



But now It starts debugger in the "Terminal" and also outputs to "Debug Console"
I want output only in the "Debug Console" ( Previously default behavior)
enter image description here
Please help me with setting it back to the way it was



{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}"
}

]}


launch.json







python debugging visual-studio-code






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 30 '18 at 10:58







HaMAD

















asked Mar 30 '18 at 10:22









HaMADHaMAD

9319




9319













  • Please add the configuration of your launch.json that you start when you press F5.

    – HaaLeo
    Mar 30 '18 at 10:37













  • @HaaLeo edited.

    – HaMAD
    Mar 30 '18 at 10:40



















  • Please add the configuration of your launch.json that you start when you press F5.

    – HaaLeo
    Mar 30 '18 at 10:37













  • @HaaLeo edited.

    – HaMAD
    Mar 30 '18 at 10:40

















Please add the configuration of your launch.json that you start when you press F5.

– HaaLeo
Mar 30 '18 at 10:37







Please add the configuration of your launch.json that you start when you press F5.

– HaaLeo
Mar 30 '18 at 10:37















@HaaLeo edited.

– HaMAD
Mar 30 '18 at 10:40





@HaaLeo edited.

– HaMAD
Mar 30 '18 at 10:40












5 Answers
5






active

oldest

votes


















13














To ensure that the output is written to the debug console you can set the debugOptions.
Adding the following entry to your configuration in yourlaunch.json should fix it:





"debugOptions": [
"RedirectOutput"
]


Edit



Setting the console option explicitly to none was the way to go. See comments.



"console": "none"





share|improve this answer


























  • It already does that. But it prints to both terminals and also when i start debugging it goes to the terminal instead of the debug console

    – HaMAD
    Mar 30 '18 at 10:55






  • 1





    Then maybe setting the console option explicitly helps. Try to set "console": "integratedTerminal":

    – HaaLeo
    Mar 30 '18 at 11:01






  • 1





    Thanks. I set it as None so now there is no terminal output :D Thanks a ton

    – HaMAD
    Mar 30 '18 at 11:03






  • 1





    You're welcome. Sure None is the way to go :). I'll update my answer so you can mark it as accepted.

    – HaaLeo
    Mar 30 '18 at 11:05













  • If you end up needing the terminal it will be more problematic. It would be easier to add a new configuration instead with none

    – SnitchingAuggie
    Jun 10 '18 at 19:13



















7














I had the same problem but I solved it by adding a new configuration at the top that looked like this:



{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "none"
},


I found this a better solution because I didn't have to change one of my other debug functions. In your case the "Python: Terminal (integrated)" debug option. Which I need as much as I need the debug console function. I use both function and they show the output where I want the output to be shown.






share|improve this answer
























  • Now I get the output only in the debug console as desired, however, how do I get the debug console to automatically launch when i start debugging?

    – YHoffman
    Jul 11 '18 at 22:07



















3














{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"stopOnEntry": false,
"console": "none"
},


these are my launch.json settings and it's working with this.






share|improve this answer


























  • Basically, the same answer as @SnitchingAuggie except the "stopOnEntry" attribute. Please explain why this is significant.

    – Barns
    Nov 14 '18 at 17:57



















0














It's also possible, as of I guess not too long ago, to add this option... not sure it was possible before:



{
...
"internalConsoleOptions": "openOnSessionStart",
...
}


hope this helps






share|improve this answer

































    0














    The accepted answer didn't work for me as it doesn't appear to be an option on my version of VSCode Version 1.30.2 (1.30.2):



    Unknown console type 'none'.



    The solution for me was to use the internalConsole option instead. I suppose it must be defaulting to the integratedTerminal option on my version.



    Here is an example:



    ...    
    {
    "type": "node",
    "request": "launch",
    "name": "Launch Program",
    "envFile": "${workspaceRoot}/.env",
    "program": "${workspaceFolder}/src/index.js",
    "autoAttachChildProcesses": true,
    "console": "internalConsole"
    },
    ...





    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49572658%2fvscode-starts-debugging-in-integrated-terminal-instead-of-debug-console%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      13














      To ensure that the output is written to the debug console you can set the debugOptions.
      Adding the following entry to your configuration in yourlaunch.json should fix it:





      "debugOptions": [
      "RedirectOutput"
      ]


      Edit



      Setting the console option explicitly to none was the way to go. See comments.



      "console": "none"





      share|improve this answer


























      • It already does that. But it prints to both terminals and also when i start debugging it goes to the terminal instead of the debug console

        – HaMAD
        Mar 30 '18 at 10:55






      • 1





        Then maybe setting the console option explicitly helps. Try to set "console": "integratedTerminal":

        – HaaLeo
        Mar 30 '18 at 11:01






      • 1





        Thanks. I set it as None so now there is no terminal output :D Thanks a ton

        – HaMAD
        Mar 30 '18 at 11:03






      • 1





        You're welcome. Sure None is the way to go :). I'll update my answer so you can mark it as accepted.

        – HaaLeo
        Mar 30 '18 at 11:05













      • If you end up needing the terminal it will be more problematic. It would be easier to add a new configuration instead with none

        – SnitchingAuggie
        Jun 10 '18 at 19:13
















      13














      To ensure that the output is written to the debug console you can set the debugOptions.
      Adding the following entry to your configuration in yourlaunch.json should fix it:





      "debugOptions": [
      "RedirectOutput"
      ]


      Edit



      Setting the console option explicitly to none was the way to go. See comments.



      "console": "none"





      share|improve this answer


























      • It already does that. But it prints to both terminals and also when i start debugging it goes to the terminal instead of the debug console

        – HaMAD
        Mar 30 '18 at 10:55






      • 1





        Then maybe setting the console option explicitly helps. Try to set "console": "integratedTerminal":

        – HaaLeo
        Mar 30 '18 at 11:01






      • 1





        Thanks. I set it as None so now there is no terminal output :D Thanks a ton

        – HaMAD
        Mar 30 '18 at 11:03






      • 1





        You're welcome. Sure None is the way to go :). I'll update my answer so you can mark it as accepted.

        – HaaLeo
        Mar 30 '18 at 11:05













      • If you end up needing the terminal it will be more problematic. It would be easier to add a new configuration instead with none

        – SnitchingAuggie
        Jun 10 '18 at 19:13














      13












      13








      13







      To ensure that the output is written to the debug console you can set the debugOptions.
      Adding the following entry to your configuration in yourlaunch.json should fix it:





      "debugOptions": [
      "RedirectOutput"
      ]


      Edit



      Setting the console option explicitly to none was the way to go. See comments.



      "console": "none"





      share|improve this answer















      To ensure that the output is written to the debug console you can set the debugOptions.
      Adding the following entry to your configuration in yourlaunch.json should fix it:





      "debugOptions": [
      "RedirectOutput"
      ]


      Edit



      Setting the console option explicitly to none was the way to go. See comments.



      "console": "none"






      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Mar 30 '18 at 11:08

























      answered Mar 30 '18 at 10:51









      HaaLeoHaaLeo

      1,6271622




      1,6271622













      • It already does that. But it prints to both terminals and also when i start debugging it goes to the terminal instead of the debug console

        – HaMAD
        Mar 30 '18 at 10:55






      • 1





        Then maybe setting the console option explicitly helps. Try to set "console": "integratedTerminal":

        – HaaLeo
        Mar 30 '18 at 11:01






      • 1





        Thanks. I set it as None so now there is no terminal output :D Thanks a ton

        – HaMAD
        Mar 30 '18 at 11:03






      • 1





        You're welcome. Sure None is the way to go :). I'll update my answer so you can mark it as accepted.

        – HaaLeo
        Mar 30 '18 at 11:05













      • If you end up needing the terminal it will be more problematic. It would be easier to add a new configuration instead with none

        – SnitchingAuggie
        Jun 10 '18 at 19:13



















      • It already does that. But it prints to both terminals and also when i start debugging it goes to the terminal instead of the debug console

        – HaMAD
        Mar 30 '18 at 10:55






      • 1





        Then maybe setting the console option explicitly helps. Try to set "console": "integratedTerminal":

        – HaaLeo
        Mar 30 '18 at 11:01






      • 1





        Thanks. I set it as None so now there is no terminal output :D Thanks a ton

        – HaMAD
        Mar 30 '18 at 11:03






      • 1





        You're welcome. Sure None is the way to go :). I'll update my answer so you can mark it as accepted.

        – HaaLeo
        Mar 30 '18 at 11:05













      • If you end up needing the terminal it will be more problematic. It would be easier to add a new configuration instead with none

        – SnitchingAuggie
        Jun 10 '18 at 19:13

















      It already does that. But it prints to both terminals and also when i start debugging it goes to the terminal instead of the debug console

      – HaMAD
      Mar 30 '18 at 10:55





      It already does that. But it prints to both terminals and also when i start debugging it goes to the terminal instead of the debug console

      – HaMAD
      Mar 30 '18 at 10:55




      1




      1





      Then maybe setting the console option explicitly helps. Try to set "console": "integratedTerminal":

      – HaaLeo
      Mar 30 '18 at 11:01





      Then maybe setting the console option explicitly helps. Try to set "console": "integratedTerminal":

      – HaaLeo
      Mar 30 '18 at 11:01




      1




      1





      Thanks. I set it as None so now there is no terminal output :D Thanks a ton

      – HaMAD
      Mar 30 '18 at 11:03





      Thanks. I set it as None so now there is no terminal output :D Thanks a ton

      – HaMAD
      Mar 30 '18 at 11:03




      1




      1





      You're welcome. Sure None is the way to go :). I'll update my answer so you can mark it as accepted.

      – HaaLeo
      Mar 30 '18 at 11:05







      You're welcome. Sure None is the way to go :). I'll update my answer so you can mark it as accepted.

      – HaaLeo
      Mar 30 '18 at 11:05















      If you end up needing the terminal it will be more problematic. It would be easier to add a new configuration instead with none

      – SnitchingAuggie
      Jun 10 '18 at 19:13





      If you end up needing the terminal it will be more problematic. It would be easier to add a new configuration instead with none

      – SnitchingAuggie
      Jun 10 '18 at 19:13













      7














      I had the same problem but I solved it by adding a new configuration at the top that looked like this:



      {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "console": "none"
      },


      I found this a better solution because I didn't have to change one of my other debug functions. In your case the "Python: Terminal (integrated)" debug option. Which I need as much as I need the debug console function. I use both function and they show the output where I want the output to be shown.






      share|improve this answer
























      • Now I get the output only in the debug console as desired, however, how do I get the debug console to automatically launch when i start debugging?

        – YHoffman
        Jul 11 '18 at 22:07
















      7














      I had the same problem but I solved it by adding a new configuration at the top that looked like this:



      {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "console": "none"
      },


      I found this a better solution because I didn't have to change one of my other debug functions. In your case the "Python: Terminal (integrated)" debug option. Which I need as much as I need the debug console function. I use both function and they show the output where I want the output to be shown.






      share|improve this answer
























      • Now I get the output only in the debug console as desired, however, how do I get the debug console to automatically launch when i start debugging?

        – YHoffman
        Jul 11 '18 at 22:07














      7












      7








      7







      I had the same problem but I solved it by adding a new configuration at the top that looked like this:



      {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "console": "none"
      },


      I found this a better solution because I didn't have to change one of my other debug functions. In your case the "Python: Terminal (integrated)" debug option. Which I need as much as I need the debug console function. I use both function and they show the output where I want the output to be shown.






      share|improve this answer













      I had the same problem but I solved it by adding a new configuration at the top that looked like this:



      {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "console": "none"
      },


      I found this a better solution because I didn't have to change one of my other debug functions. In your case the "Python: Terminal (integrated)" debug option. Which I need as much as I need the debug console function. I use both function and they show the output where I want the output to be shown.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Apr 4 '18 at 16:26









      SnitchingAuggieSnitchingAuggie

      18410




      18410













      • Now I get the output only in the debug console as desired, however, how do I get the debug console to automatically launch when i start debugging?

        – YHoffman
        Jul 11 '18 at 22:07



















      • Now I get the output only in the debug console as desired, however, how do I get the debug console to automatically launch when i start debugging?

        – YHoffman
        Jul 11 '18 at 22:07

















      Now I get the output only in the debug console as desired, however, how do I get the debug console to automatically launch when i start debugging?

      – YHoffman
      Jul 11 '18 at 22:07





      Now I get the output only in the debug console as desired, however, how do I get the debug console to automatically launch when i start debugging?

      – YHoffman
      Jul 11 '18 at 22:07











      3














      {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "stopOnEntry": false,
      "console": "none"
      },


      these are my launch.json settings and it's working with this.






      share|improve this answer


























      • Basically, the same answer as @SnitchingAuggie except the "stopOnEntry" attribute. Please explain why this is significant.

        – Barns
        Nov 14 '18 at 17:57
















      3














      {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "stopOnEntry": false,
      "console": "none"
      },


      these are my launch.json settings and it's working with this.






      share|improve this answer


























      • Basically, the same answer as @SnitchingAuggie except the "stopOnEntry" attribute. Please explain why this is significant.

        – Barns
        Nov 14 '18 at 17:57














      3












      3








      3







      {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "stopOnEntry": false,
      "console": "none"
      },


      these are my launch.json settings and it's working with this.






      share|improve this answer















      {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "stopOnEntry": false,
      "console": "none"
      },


      these are my launch.json settings and it's working with this.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Aug 16 '18 at 7:59









      Pang

      6,8911563101




      6,8911563101










      answered Aug 16 '18 at 7:39









      anilsanils

      313




      313













      • Basically, the same answer as @SnitchingAuggie except the "stopOnEntry" attribute. Please explain why this is significant.

        – Barns
        Nov 14 '18 at 17:57



















      • Basically, the same answer as @SnitchingAuggie except the "stopOnEntry" attribute. Please explain why this is significant.

        – Barns
        Nov 14 '18 at 17:57

















      Basically, the same answer as @SnitchingAuggie except the "stopOnEntry" attribute. Please explain why this is significant.

      – Barns
      Nov 14 '18 at 17:57





      Basically, the same answer as @SnitchingAuggie except the "stopOnEntry" attribute. Please explain why this is significant.

      – Barns
      Nov 14 '18 at 17:57











      0














      It's also possible, as of I guess not too long ago, to add this option... not sure it was possible before:



      {
      ...
      "internalConsoleOptions": "openOnSessionStart",
      ...
      }


      hope this helps






      share|improve this answer






























        0














        It's also possible, as of I guess not too long ago, to add this option... not sure it was possible before:



        {
        ...
        "internalConsoleOptions": "openOnSessionStart",
        ...
        }


        hope this helps






        share|improve this answer




























          0












          0








          0







          It's also possible, as of I guess not too long ago, to add this option... not sure it was possible before:



          {
          ...
          "internalConsoleOptions": "openOnSessionStart",
          ...
          }


          hope this helps






          share|improve this answer















          It's also possible, as of I guess not too long ago, to add this option... not sure it was possible before:



          {
          ...
          "internalConsoleOptions": "openOnSessionStart",
          ...
          }


          hope this helps







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 10 at 5:08









          Ali

          1,0261319




          1,0261319










          answered Jan 10 at 1:51









          omartin2010omartin2010

          1




          1























              0














              The accepted answer didn't work for me as it doesn't appear to be an option on my version of VSCode Version 1.30.2 (1.30.2):



              Unknown console type 'none'.



              The solution for me was to use the internalConsole option instead. I suppose it must be defaulting to the integratedTerminal option on my version.



              Here is an example:



              ...    
              {
              "type": "node",
              "request": "launch",
              "name": "Launch Program",
              "envFile": "${workspaceRoot}/.env",
              "program": "${workspaceFolder}/src/index.js",
              "autoAttachChildProcesses": true,
              "console": "internalConsole"
              },
              ...





              share|improve this answer




























                0














                The accepted answer didn't work for me as it doesn't appear to be an option on my version of VSCode Version 1.30.2 (1.30.2):



                Unknown console type 'none'.



                The solution for me was to use the internalConsole option instead. I suppose it must be defaulting to the integratedTerminal option on my version.



                Here is an example:



                ...    
                {
                "type": "node",
                "request": "launch",
                "name": "Launch Program",
                "envFile": "${workspaceRoot}/.env",
                "program": "${workspaceFolder}/src/index.js",
                "autoAttachChildProcesses": true,
                "console": "internalConsole"
                },
                ...





                share|improve this answer


























                  0












                  0








                  0







                  The accepted answer didn't work for me as it doesn't appear to be an option on my version of VSCode Version 1.30.2 (1.30.2):



                  Unknown console type 'none'.



                  The solution for me was to use the internalConsole option instead. I suppose it must be defaulting to the integratedTerminal option on my version.



                  Here is an example:



                  ...    
                  {
                  "type": "node",
                  "request": "launch",
                  "name": "Launch Program",
                  "envFile": "${workspaceRoot}/.env",
                  "program": "${workspaceFolder}/src/index.js",
                  "autoAttachChildProcesses": true,
                  "console": "internalConsole"
                  },
                  ...





                  share|improve this answer













                  The accepted answer didn't work for me as it doesn't appear to be an option on my version of VSCode Version 1.30.2 (1.30.2):



                  Unknown console type 'none'.



                  The solution for me was to use the internalConsole option instead. I suppose it must be defaulting to the integratedTerminal option on my version.



                  Here is an example:



                  ...    
                  {
                  "type": "node",
                  "request": "launch",
                  "name": "Launch Program",
                  "envFile": "${workspaceRoot}/.env",
                  "program": "${workspaceFolder}/src/index.js",
                  "autoAttachChildProcesses": true,
                  "console": "internalConsole"
                  },
                  ...






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 21 hours ago









                  Matthew SandersMatthew Sanders

                  3,3671533




                  3,3671533






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49572658%2fvscode-starts-debugging-in-integrated-terminal-instead-of-debug-console%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      MongoDB - Not Authorized To Execute Command

                      How to fix TextFormField cause rebuild widget in Flutter

                      Npm cannot find a required file even through it is in the searched directory