Java IntelliJ IDEA 12——查看调用堆栈

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18747590/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 10:43:13  来源:igfitidea点击:

IntelliJ IDEA 12 -- viewing the call stack

javaactionscriptintellij-idea

提问by Monwe

I'm new to the IntelliJ IDE (usually work with Visual Studio) and I'd like to view the current call stack at a particular breakpoint. I've found information on building a call hierarchy but that's not what I'm looking for. Any information on how to view the current call stack would be appreciated.

我是 IntelliJ IDE 的新手(通常使用 Visual Studio),我想在特定断点处查看当前调用堆栈。我找到了有关构建调用层次结构的信息,但这不是我要找的。任何有关如何查看当前调用堆栈的信息将不胜感激。

采纳答案by Ashutosh Jindal

The call stack is viewable when you click on the 'Debug' button on the bottom toolbar: enter image description here

单击底部工具栏上的“调试”按钮时,可以查看调用堆栈: 在此处输入图片说明

Specifically, the call stack is as highlighted below : enter image description here

具体来说,调用堆栈如下所示: 在此处输入图片说明

You may also be interested in an alternative threads view, enabled by clicking the 'Restore threads view' button: enter image description here

您可能还对通过单击“恢复线程视图”按钮启用的替代线程视图感兴趣: 在此处输入图片说明

Here is a bit of official documentation around debugging that you may find useful if you are new to IntelliJ:

以下是一些有关调试的官方文档,如果您不熟悉 IntelliJ,您可能会发现它们很有用:

  1. Debug Tool Window
  2. Debug Tool Window - Frames
  3. Debug Tool Window - Threads
  1. 调试工具窗口
  2. 调试工具窗口 - 帧
  3. 调试工具窗口 - 线程

回答by duffymo

It's on the lower left in the debug window.

它位于调试窗口的左下方。

回答by only_me

I've had it where the Frames and Threads debug tabs are collapsed and only the Variables tab is visible. In this case click and drag the left window edge of the Variables tab to the right.enter image description here

我已经将 Frames 和 Threads 调试选项卡折叠起来,并且只有 Variables 选项卡可见。在这种情况下,单击并向右拖动变量选项卡的左窗口边缘。在此处输入图片说明

回答by dzezzz

I had only the view on 'Variables', finally what helped was clicking 'Restore Layout' on the left side of Debugger window (this button: button). Somehow I must have remove 'Frames' before - no other way to restore it...

我只有“变量”的视图,最后点击调试器窗口左侧的“恢复布局”(此按钮:)有帮助按钮。不知何故,我之前必须删除“框架”-没有其他方法可以恢复它...

回答by nick w.

Debugger window has three main tabs, 'Frame & Treads', 'Variables', and 'Watches'. In my case, 'Variables' tab occupied the whole debugger window, and it showed Variables tab only. There is a window splitter at the edge of the 'Variables' tab. To show 'Frame & Treads', move mouse on to the left edge of 'Variables' tab. Mouse cursor changes to a splitter. Slide right to resize tab size for 'Frame & Treads'.

调试器窗口具有三个主要选项卡,“Frame & Treads”、“Variables”和“Watches”。就我而言,“变量”选项卡占据了整个调试器窗口,并且仅显示“变量”选项卡。“变量”选项卡的边缘有一个窗口拆分器。要显示“框架和踏板”,请将鼠标移到“变量”选项卡的左边缘。鼠标光标变为分隔符。向右滑动以调整“框架和踏板”的标签大小。

回答by sitaktif

If you only see the current stack frame when stepping into library code, you can click on the "funnel" icon (bottom right on the screenshot below) to display the full, unfiltered call stack.

如果您在单步执行库代码时只看到当前堆栈帧,您可以单击“漏斗”图标(下方屏幕截图的右下方)以显示完整的、未过滤的调用堆栈。

intellij debug window

智能调试窗口