Unable to perform this action because the process is running.

Unable to perform this action because the process is running.

๐Ÿงถ Problem


#include <iostream>

using namespace std;

int main(){
 const double PI{3.1459};
 double radius;

 cout << "์›์˜ ๋ฐ˜๊ฒฝ์„ ์ž…๋ ฅํ•˜์‹œ์˜ค : ";
 cin >> radius;
 double area = radius * radius * PI;
 cout << "์›์˜ ๋ฉด์  = " << area << endl;
 return 0;
}

๋ฐฉ์†ก๋Œ€ C++ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ˆ˜์—…์„ ๋“ฃ๋‹ค๊ฐ€ ์˜ˆ์‹œ๋กœ ์ œ์‹œ๋œ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰์‹œ์ผœ ํ•™์Šตํ•˜๋˜ ๋„์ค‘์— Debug console์— ๋‹ค์Œ ๊ฒฝ๊ณ  ๋ฉ”์„ธ์ง€๊ฐ€ ๋„์›Œ์กŒ๋‹ค.

Warning: Debuggee TargetArchitecture not detected, assuming x86_64.



์ฝ”๋“œ๊ฐ€ ์‹คํ–‰๋œ ๊ฒƒ์„ ๋ณด๋‹ˆ, โ€œ์›์˜ ๋ฐ˜๊ฒฝ์„ ์ž…๋ ฅํ•˜์‹œ์˜ค : โ€œ ๊ฐ€ ์•„๋‹Œ ๋ญ”๊ฐ€ ๊นจ์ง„ ๋“ฏํ•œ ๋ฌธ์ž์—ด์ด ๋‚˜์—ด๋˜์—ˆ๋‹ค.

xecx9bx90xecx9dx98 xebxb0x98xeaxb2xbdxecx9dx84 xecx9ex85xebxa0xa5xedx95x98xecx8bx9cxecx98xa4 :


์ž…๋ ฅ๊ฐ’์„ ๋„ฃ์–ด๋ณด๋‹ˆ, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฉ”์„ธ์ง€๊ฐ€ ๋‚˜์™”๋‹ค. ๐Ÿซง๐Ÿซง๐Ÿซง

Unable to perform this action because the process is running.


์ด๋Ÿฐ ์—๋Ÿฌ๋ฉ”์„ธ์ง€๋Š” ๋””๋ฒ„๊ทธ ์ฝ˜์†”์„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ํ„ฐ๋ฏธ๋„๋กœ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ์ž…๋ ฅ๊ฐ’์„ ์ž…๋ ฅํ•  ๋•Œ ์ด๋ฏธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ํ”„๋กœ์„ธ์Šค๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ์žˆ์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฐœ์ƒํ•œ๋‹ค.

๋‚˜๋Š” ์ด๋ฏธ ํ”„๋กœ๊ทธ๋žจ์„ ์‹คํ–‰ํ•˜๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์ง€๊ธˆ์€ ๋‹น์‹ ์ด ์š”์ฒญํ•˜๋Š” ๊ฒƒ์„ ํ•  ์ˆ˜ ์—†๋‹ค ๋ผ๋Š” ๋ฉ”์„ธ์ง€.

์ด ๊ฒฝ์šฐ ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ launch.json์˜ ์„ค์ •์„ ๋ณ€๊ฒฝํ•˜์—ฌ ์ƒˆ๋กœ์šด ์ฝ˜์†”์ฐฝ์„ ๋„์›Œ ์ž…๋ ฅ์„ ๋ฐ›๋Š” ๊ฒƒ์ด๋‹ค.

๐Ÿช„ Solution


vscode์—์„œ C++์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ .vscode ํด๋” ์•ˆ์— launch.json ํŒŒ์ผ์ด ์žˆ๋‹ค.

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "clang++ - ํ™œ์„ฑ ํŒŒ์ผ ๋นŒ๋“œ ๋ฐ ๋””๋ฒ„๊ทธ",
      "type": "cppdbg",
      "request": "launch",
      "program": "${fileDirname}/${fileBasenameNoExtension}",
      "args": [],
      "stopAtEntry": false,
      "cwd": "${fileDirname}",
      "environment": [],
      "externalConsole": false,  // ์ด ๋ถ€๋ถ„์„ true๋กœ ๋ณ€๊ฒฝํ•˜๋ฉด ์ƒˆ๋กœ์šด ์ž…๋ ฅ ์ฝ˜์†”์ฐฝ์ด ๋„์›Œ์ง„๋‹ค!
      "MIMode": "lldb",
      "preLaunchTask": "C/C++: clang++ ํ™œ์„ฑ ํŒŒ์ผ ๋นŒ๋“œ"
    }
  ]
}

ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ launch.json ํŒŒ์ผ์˜ configurations์—์„œ "externalConsole": true๋กœ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ด๋‹ค.


์„ค์ •์„ ๋ณ€๊ฒฝํ•œ ํ›„ ํ•ด๋‹น ์ฝ”๋“œ๋ฅผ ๋‹ค์‹œ ์‹คํ–‰ํ•˜๋ฉด ์ƒˆ๋กœ์šด ์ฝ˜์†”์ฐฝ์ด ๋„์›Œ์ง„๋‹ค.

c1


๊ฐ’์„ ์ž…๋ ฅํ•˜๋ฉด ๊ทธ์— ๋งž๋Š” ๊ฒฐ๊ณผ๊ฐ’์ด ํ‘œ์‹œ๋˜๋Š” ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

c2



์ฐธ๊ณ  ๐Ÿซง

Stack overflow - Unable to perform this action because the process is running