newtype
::: newtype의 지식창고 :::
newtype
전체 방문자
603,295
오늘
36
어제
40
  • 분류 전체보기 (387)
    • it (209)
      • c (43)
      • VB (5)
      • csharp (2)
      • etc (32)
      • devOps (6)
      • python (2)
      • go (5)
      • emb (25)
      • win (4)
      • db (20)
      • www (49)
      • sqlce (7)
      • gmap (6)
      • cygwin (2)
      • ruby (1)
    • 명언 (10)
    • 모임 (18)
      • 붕주회 (3)
      • 신흥컴정 (14)
      • 웹20기 (1)
    • 사진 (8)
    • 불펌 (29)
    • 막글 (98)
    • 게임 (6)
    • 여행 (8)

블로그 메뉴

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

공지사항

  • whoami
02-01 12:21
hELLO · Designed By 정상우.
newtype

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

it/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
    }
  ]
},
반응형
    'it/c' 카테고리의 다른 글
    • FindMSSQL
    • Simple Http Server
    • OpenSSL 을 사용한 RSA
    • Visual Leak Detector 를 사용하여 Leak을 감지하는 방법.
    debugging, g++, GCC, Remote, vscode, 디버그, 원격디버깅
    newtype
    newtype
    지극히 개인적인 지식의 창고
    댓글쓰기
    이전 글
    FindMSSQL

    티스토리툴바