Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

See call stack while debugging in Pydev

Is there a way to see the call stack while debugging python in Pydev?

like image 705
Jonathan Livni Avatar asked Dec 20 '11 08:12

Jonathan Livni


People also ask

How can I see my call stack?

View the call stack while in the debugger While debugging, in the Debug menu, select Windows > Call Stack or press ctrl + alt + C . A yellow arrow identifies the stack frame where the execution pointer is currently located.

How can I see call stack in Vscode?

To display the call stack window you must first start your code in debug mode. Either start your application using the Step Into command or use a breakpoint to halt execution. You can then show the window by opening the "Debug" menu, expanding its "Windows" submenu and selecting "Call Stack".

What is Debug call stack?

The call stack is a list of all the active functions that have been called to get to the current point of execution. The call stack includes an entry for each function called, as well as which line of code will be returned to when the function returns.


2 Answers

This is the "Debug" view of the "Debug" perspective :

enter image description here

You can see that I was inside a failUnlessEqual method, called by test_01a, called by a new_method...

like image 77
Cédric Julien Avatar answered Oct 18 '22 20:10

Cédric Julien


To have the complete stacktrace you could add the following watch expression:

[stackLine for stackLine in __import__("traceback").format_stack() if not 'pydev' in stackLine]

I am not sure if there is a better way to have the complete stacktrace...

like image 1
gecco Avatar answered Oct 18 '22 20:10

gecco