newtype
::: newtype의 지식창고 :::
newtype
전체 방문자
오늘
어제
  • 분류 전체보기 (392)
    • Dev (214)
      • C, C++ (43)
      • Go (5)
      • Web (49)
      • DBMS (21)
      • DevOps (8)
      • Java (2)
      • Windows, Win32 (4)
      • Visual Basic (5)
      • C# (2)
      • Mobile (25)
      • SQL CE (7)
      • Google Map (6)
      • Python (2)
      • cygwin (2)
      • 기타 (32)
      • Ruby (1)
    • 명언 (10)
    • 모임 (18)
      • 붕주회 (3)
      • 신흥컴정 (14)
      • 웹20기 (1)
    • 사진 (8)
    • 불펌 (29)
    • 막글 (98)
    • 게임 (6)
    • 여행 (8)

블로그 메뉴

  • 홈
  • 태그
  • 방명록
  • 관리

공지사항

  • whoami
05-13 00:00
hELLO · Designed By 정상우.
newtype

::: newtype의 지식창고 :::

Dev/C, C++

vscode 에서 원격 디버깅

2020. 11. 24. 17:30

목적

- vscode를 사용해서 g++을 원격으로 디버깅하는 방법을 설명하고자 한다.

방법

  1. 먼저 ssh로 접속이 가능하도록 설정 한다. (여기 까지는 공개된 방법이 많이 있습니다)

    • code.visualstudio.com/docs/remote/ssh
  2. 작업 영역을 설정한다.

    • 디버깅은 작업영역을 설정해야 가능 합니다.
  3. launch.json 파일에 추가한다.

  • Run
{
  "name": "process1 run",
  "type": "cppdbg",
  "request": "launch",
  "program": "/home/newtype/vscode_debug/process1",
  "cwd": "${workspaceFolder}",
  "MIMode": "gdb",
  "miDebuggerPath": "/usr/bin/gdb",
  "setupCommands": [
    {
      "description": "Enable pretty-printing for gdb",
      "text": "-enable-pretty-printing",
      "ignoreFailures": true
    }
  ]
},
  • Attatch
{
  "name": "process1 Attach",
  "type": "cppdbg",
  "request": "attach",
  "program": "/home/newtype/vscode_debug/process1",
  "MIMode": "gdb",
  "processId": "${command:pickProcess}",
  "miDebuggerPath": "/usr/bin/gdb",
  "setupCommands": [
    {
      "description": "Enable pretty-printing for gdb",
      "text": "-enable-pretty-printing",
      "ignoreFailures": true
    }
  ]
},
반응형

'Dev > C, C++' 카테고리의 다른 글

FindMSSQL  (0) 2017.09.12
Simple Http Server  (0) 2017.06.08
OpenSSL 을 사용한 RSA  (0) 2017.05.30
Visual Leak Detector 를 사용하여 Leak을 감지하는 방법.  (0) 2016.02.15
debian 계열 linux에서 core 파일 생성 방법  (0) 2015.07.30
    'Dev/C, C++' 카테고리의 다른 글
    • FindMSSQL
    • Simple Http Server
    • OpenSSL 을 사용한 RSA
    • Visual Leak Detector 를 사용하여 Leak을 감지하는 방법.
    newtype
    newtype
    지극히 개인적인 지식의 창고

    티스토리툴바