File tree Expand file tree Collapse file tree 5 files changed +39
-3
lines changed
Expand file tree Collapse file tree 5 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 11.git
22.github
3- .vscode
4- hello-world
3+ .vscode
Original file line number Diff line number Diff line change 1+ {
2+ // Use IntelliSense to learn about possible attributes.
3+ // Hover to view descriptions of existing attributes.
4+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+ "version" : " 0.2.0" ,
6+ "configurations" : [
7+ {
8+ "name" : " C++ Attach" ,
9+ "type" : " cppdbg" ,
10+ "request" : " attach" ,
11+ "program" : " ${workspaceRoot}/hello-world" ,
12+ "useExtendedRemote" : true ,
13+ "miDebuggerServerAddress" : " localhost:2345" ,
14+ "miDebuggerPath" : " /usr/bin/gdb" ,
15+ "targetArchitecture" : " x86_64" ,
16+ "linux" : {
17+ "MIMode" : " gdb"
18+ },
19+ "osx" : {
20+ "MIMode" : " gdb"
21+ },
22+ "windows" : {
23+ "MIMode" : " gdb"
24+ },
25+
26+ }
27+ ]
28+ }
Original file line number Diff line number Diff line change 11FROM gcc:13.2
2- RUN apt-get update && apt-get install -y gdb
2+ RUN apt-get update && apt-get install -y gdb gdbserver
33
44WORKDIR /app
55COPY Makefile /app
Original file line number Diff line number Diff line change 11build :
22 g++ -g -o hello-world -Iheaders hello-world.cpp
33
4+ debug :
5+ gdbserver :2345 ./hello-world
6+
47start :
58 ./hello-world
Original file line number Diff line number Diff line change 66 command : bash
77 sync :
88 - .:/app
9+ forward :
10+ - 2345:2345
11+ securityContext :
12+ capabilities :
13+ add :
14+ - SYS_PTRACE
You can’t perform that action at this time.
0 commit comments