This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 155103

Summary: Run To Cursor for JUnit tests.
Product: debugger Reporter: Peter Pis <ppis>
Component: JavaAssignee: issues@debugger <issues>
Status: NEW ---    
Severity: blocker CC: gholmer, ulfzibis
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 155070    

Description Peter Pis 2008-12-10 09:38:42 UTC
Currently, it's not possible to use "Run To Cursor" functionality for JUnit tests.

Only project's main java files are taken into account.
Comment 1 areeda 2010-11-21 15:04:28 UTC
(In reply to comment #0)
> Currently, it's not possible to use "Run To Cursor" functionality for JUnit
> tests.
> 
> Only project's main java files are taken into account.

As part of 7.0 Beta NetCat, I thought I'd see how many JUnit bugs I could reproduce.  This one may be resolved or I don't understand the problem.

I put a breakpoint in <package>Suite:setUpClass, Debug the test suite by a right click on that file and Debug File or Debug test file.  At the break point go to a line in a Class test and hit F4.  Test continues and breaks at that line.

That's the "Run to Cursor" behavior, I expect.  Am I missing something?

Joe
Comment 2 Martin Entlicher 2010-11-23 09:42:05 UTC
"Run to Cursor" works fine when the debugger session is already running.
But "Run to Cursor" can be used to start a new debugger session also. This works fine when you have a cursor in project sources, debugging of that project is started. But when the cursor is in tests, debugging of tests is not started, the project is being debugged instead.