From 984ec4ee7bce3f4f00b064fe1e082c7f91ccf771 Mon Sep 17 00:00:00 2001 From: YongWoo Lee <yygg9800@naver.com> Date: Sun, 30 Jun 2024 22:07:48 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=9D=B4=EC=9A=A9=EC=9A=B0]=2013=EC=A3=BC?= =?UTF-8?q?=EC=B0=A8=20=EB=AF=B8=EC=85=98=20=EC=A0=9C=EC=B6=9C=20(#107)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../13\354\243\274\354\260\250.md" | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 "8th_members/\354\235\264\354\232\251\354\232\260/13\354\243\274\354\260\250.md" diff --git "a/8th_members/\354\235\264\354\232\251\354\232\260/13\354\243\274\354\260\250.md" "b/8th_members/\354\235\264\354\232\251\354\232\260/13\354\243\274\354\260\250.md" new file mode 100644 index 0000000..ae52e37 --- /dev/null +++ "b/8th_members/\354\235\264\354\232\251\354\232\260/13\354\243\274\354\260\250.md" @@ -0,0 +1,31 @@ +### 1. pdb 실행 + +|shortcut|설명| +|---|---| +|`l`|주변 소스코드를 출력하며 현재 라인이 화살표로 나옴| +|`n`|다음 문장으로 이동| +|`s`|Step Into| +|`w`|함수의 call stack 출력| +|`s`|현재 함수의 argument들을 출력| + +<img src="https://github.com/wooy0ng/wooy0ng/assets/37149278/f66f7214-b2cb-4178-9d1b-dfd27835e1cb" width=600> + +<br><br><hr> + +### 2. CProfile 예제 파일 직접 생성해서 실행해보기 + +``` bash +$ python -m cProfile -o output.pstat portscanner_multithread.py +``` + +<!-- <img src="https://github.com/wooy0ng/wooy0ng/assets/37149278/5e2852a3-c7d5-41fe-a3c8-5b172bd7e954" width=600> --> + + +<br> + +``` bash +$ pip install snakeviz +$ python -m snakeviz output.pstat +``` + +<img src="https://github.com/wooy0ng/wooy0ng/assets/37149278/e1e0e8db-4679-4672-8689-6c3dcfcbe82e" width=1000> \ No newline at end of file