I
I
imko2021-09-09 13:36:54
C++ / C#
imko, 2021-09-09 13:36:54

How to choose cmd instead of PS for debugging in VS Code?

There is an extension ms-vscode.cpptools, I write a cpp file

#include <iostream>

int main()
{
  std::cout << "helloworld" << std::endl;
}


I press F5, the debug configuration is automatically created
{
  // Используйте IntelliSense, чтобы узнать о возможных атрибутах.
  // Наведите указатель мыши, чтобы просмотреть описания существующих атрибутов.
  // Для получения дополнительной информации посетите: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "g++.exe - Сборка и отладка активного файла",
      "type": "cppdbg",
      "request": "launch",
      "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
      "args": [],
      "stopAtEntry": false,
      "cwd": "${fileDirname}",
      "environment": [],
      "externalConsole": false,
      "MIMode": "gdb",
      "miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe",
      "setupCommands": [
        {
          "description": "Включить автоматическое форматирование для gdb",
          "text": "-enable-pretty-printing",
          "ignoreFailures": true
        }
      ],
      "preLaunchTask": "C/C++: g++.exe сборка активного файла"
    }
  ]
}


and the terminal is launched, but PowerShell is launched instead of CMD, although the settings explicitly indicate to use CMD
dEejSWGncO0.jpg?size=575x105&quality=96&sign=e591f6434b924b06ee4054969aa0115c&type=album
If I create a terminal with my hands - with a keyboard shortcut or through the menu, then CMD opens correctly The
question is, how to force debug to open not PS but CMD?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
I Phoenix I, 2021-09-14
@PhoenixX33i

Tip: look for answers and information on the foreign Internet, there are answers ....
Here's an example. If I understood everything correctly, then this is exactly the solution to your problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question