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