如何将 NetBeans 配置为仅单步执行我编写的 Java 代码 [英] How do I configure NetBeans to only step through Java code that I've written

查看:19
本文介绍了如何将 NetBeans 配置为仅单步执行我编写的 Java 代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我错过了什么吗?我很高兴所有这些代码都展示了泛型集合如何工作等等.但是,当我想简单地走我的代码时,我发现自己总是比我所关心的更深入地研究 Java 自己的库代码.

Am I missing something? I'm delighted that all that code is there showing how the generic collections work etc. However when I want to simply walk my code I'm forever finding myself going deeper into Java's own library code than I care to.

是否可以在步进代码时简单地禁用它 - 我想将所有这些东西视为黑盒,代码步进仅适用于我编写的东西.

Is it possible to simply disable that when stepping code - I want to treat all of that stuff as a Black Box, code stepping is just for stuff I've written.

你知道吗,现在我有了这个能力,是否也可以用这种方式包装我自己的代码,以便我可以只执行我最感兴趣的部分?

And you know what, now I've got that capability, is it possible to wrap up my own code that way too so that I can step just the bits I'm most interested in?

如果我不能轻松地在 netbeans 中,是否可以在 eclipse 中?

And if i can't easily in netbeans, is it possible in eclipse?

谢谢

推荐答案

其实,最简单的方法是到 Window -> Debugging -> Sources 勾选要调试的文件,然后进入.很可能您只需要取消选中项目中的其他来源.

Actually, the easiest way is to go to Window -> Debugging -> Sources and check off the files that you want to debug and step in to. Most likely you just need to UNcheck the other sources in your project.

但这是最简单的方法.

这篇关于如何将 NetBeans 配置为仅单步执行我编写的 Java 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆