Advanced 250+ TOP MCQs on Debugging in Eclipse and Answers

This set of Advanced Java Multiple Choice Questions & Answers (MCQs) on “Debugging in Eclipse”.

1. Which mode allows us to run program interactively while watching source code and variables during execution?
a) safe mode
b) debug mode
c) successfully run mode
d) exception mode

Answer: b
Clarification: Debug mode allows us to run program interactively while watching source code and variables during execution.

2. How can we move from one desired step to another step?
a) breakpoints
b) System.out.println
c) logger.log
d) logger.error

Answer: a
Clarification: Breakpoints are inserted in code. We can move from one point to another in the execution of a program.

3. Which part stores the program arguments and startup parameters?
a) debug configuration
b) run configuration
c) launch configuration
d) project configuration

Answer: c
Clarification: Launch configuration stores the startup class, program arguments and vm arguments.

4. How to deep dive into the execution of a method from a method call?
a) F3
b) F5
c) F7
d) F8

Answer: b
Clarification: F5 executes currently selected line and goes to the next line in the program. If the selected line is a method call, debugger steps into the associated code.

5. Which key helps to step out of the caller of currently executed method?
a) F3
b) F5
c) F7
d) F8

Answer: c
Clarification: F7 steps out to the caller of the currently executed method. This finishes the execution of the current method and returns to the caller of this method.

6. Which view allows us to delete and deactivate breakpoints and watchpoints?
a) breakpoint view
b) variable view
c) debug view
d) logger view

Answer: a
Clarification: The Breakpoints view allows us to delete and deactivate breakpoints and watchpoints. We can also modify their properties.

7. What is debugging an application which runs on another java virtual machine on another machine?
a) virtual debugging
b) remote debugging
c) machine debugging
d) compiling debugging

Answer: b
Clarification: Remote debugging allows us to debug applications which run on another Java virtual machine or even on another machine. We need to set certain flags while starting the application.

java -Xdebug -Xnoagent 
-Djava.compiler=NONE 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005.

8. What happens when the value of variable change?
a) changed value pop on the screen
b) variable changes are printed in logs
c) dump of variable changes are printed on the screen on end of execution
d) variable tab shows variables highlighted when values change

Answer: d
Clarification: When a variable value changes, the value in variable tab is highlighted yellow in eclipse.

9. Which perspective is used to run a program in debug view?
a) java perspective
b) eclipse perspective
c) debug perspective
d) jdbc perspective

Answer: c
Clarification: We can switch from one perspective to another. Debug perspective shows us the breakpoints, variables, etc.

10. How does eclipse provide the capability for debugging browser actions?
a) internal web browser
b) chrome web browser
c) firefox web browser
d) internet explorer browser

Answer: a
Clarification: Eclipse provides internal web browser to debug browser actions.

Leave a Reply

Your email address will not be published. Required fields are marked *