Python profiling with VSCode

Kirill Strelkov
Apr 16, 2021

--

Create launch configuration to run any Python file with profiler:

See “Python: Current File with profiler” configuration. Here we are running cProfile module with our file ${file}out file is /tmp/tmp.prof

Open output file with snakeviz:

snakeviz /tmp/tmp.prof

You should be able to see profiled information:

More about snakeviz can be found in previous post -https://medium.com/@kirillstrelkov/easy-python-profiling-a70cbf699295

--

--

Responses (1)