본문 바로가기

debugging

(4)
[SWIFT] dump() 함수 출력을 문자열로 바꾸는 방법 dump 함수는 클래스 인스턴스의 내부 속성까지 간단히 출력해 주기 때문에 디버깅시에 편리하다. 그런데, 출력 내용을 문자열로 저장하여, stdout, stderr 가 아닌 곳으로도 출력/저장하고 싶었다. 스택오버플로우에 간단한 답변이 있었다. https://stackoverflow.com/a/42094841/100093 let myClass = MyClass() var myClassDumped = String() dump(myClass, to: &myClassDumped) https://github.com/apple/swift/blob/master/stdlib/public/core/OutputStream.swift 위 링크를 인용하고 있는데, 직접 영문설명을 읽어보는 게 좋겠지만, 요약하면, print..
[Python] Python Profiling 관련 메모 cProfile : 파이썬 표준라이브러리 프로파일러python -m cProfile script.py python -m cProfile -s tottime script.py python -m cProfile -o prof.out script.py 프로파일 시각화 : Visualizing the Results of Profiling Python Code pyprof2calltree pyinstumentpython -m pyinstrument --show-all script.py
[WinDbg] PyKd PyKd 라는 windbg python script
[SQL] 저장프로시져 디버깅 ( how to debug stored procedure in ms-sql ) MS-SQL 에서 저장 프로시져를 디버깅하는 방법1. 프로시져 안에 print 문을 사용하면서 로깅을 찍을 수 있다.2. MS-SQL 2008 에서는 F5를 눌러 실행하지 말고, alt+F5를 실행하면, 비주얼 스튜디오 디버거 처럼 F10, F11 키로 한 행씩 진행하며 디버깅 할 수 있다고 한다.