断点会停止所有线程吗? [英] Does a breakpoint halt all threads?

查看:40
本文介绍了断点会停止所有线程吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我的程序中有两个线程并发运行并在其中一个线程上设置断点,那么当遇到此断点时,另一个线程是否也会停止,还是会继续执行?

If I have two threads running concurrently in my program and put a breakpoint on one of them, will the other thread stop also halt when this breakpoint is hit, or will it continue executing regardless?

(我用 Java 编写并使用 NetBeans)

(I am writing in Java and using NetBeans)

推荐答案

断点有一个选项,它们应该如何表现:暂停单个线程或所有线程

Breakpoints have an option how they should behave: to suspend a single thread or all threads

这篇关于断点会停止所有线程吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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