python-line-profiler is a vscode extension to configure and run line_profiler, then visualize the results in the editor. This is a very buggy beta. If you run into a problem, look at the known issues ...