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 194680 - Debug Test and Step Into Test doesn't work
Summary: Debug Test and Step Into Test doesn't work
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: PC Solaris
: P2 normal (vote)
Assignee: Thomas Preisler
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2011-01-25 10:47 UTC by soldatov
Modified: 2011-02-22 10:33 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2011-01-25 10:47:00 UTC
http://elif:8080/hudson/view/IDE-tests/job/ss-test-intel-S2-4/99/testReport/cnd.unittest/

Scenario:
- Create C/C++ Application project with main.cpp
- Add such code into main.cpp:
int f() {
    return 0;
}
- Build project
- Call context menu on main.cpp node in Projects tab and select "Create Test|New C++ Simple Test"
- Create some test
- Call context menu on new test in Test Files logical folder and select Step Into Test
==> Debugger stopped in main.cpp
Comment 1 nnnnnk 2011-01-26 14:56:22 UTC
Some evaluation:
The problem appears in getExecutable() in ProjectActionEvent.
In MakeActionProvider (line 525) I provide execution parameter to ProjectActionEvent constructor that for some reason is ignored in execution process.
Comment 2 Egor Ushakov 2011-01-26 15:05:22 UTC
ProjectActionEvent should honor executable value, most probably it should be set in constructor depending on provided value and type
Comment 3 Leonid Lenyashin 2011-02-01 07:09:10 UTC
Thomas, what is the status of this bug?
Comment 4 Thomas Preisler 2011-02-04 01:11:57 UTC
OK I see what is going on.

The regression was introduced with Igor's first implementation of the Run Command. Now the executable is always taken from the Run Command regardless you specify a different executable in the constructor. I will nee to look into how to fix it so t doesn't regress further, but Step Into doesn't seem to work even if I fix the executable part. Try to uncomment the following lines in getExcutable() :


 public String getExecutable() {
        // see IZ 191812 we should always get executable for debug from run command
//	if (type == PredefinedType.RUN || type == PredefinedType.DEBUG || type == PredefinedType.DEBUG_STEPINTO) {
//            return getExecutableFromRunCommand();
//        }
	return executable;
 }

You will then get the correct executable (f1) but it still doesn't work correctly. There is something more going on.

I will fix the executable issue tomorrow.
Comment 5 Thomas Preisler 2011-02-04 20:20:47 UTC
Implemented a temporare hack that solves the issue. Once it has been verified, I (or Nikolay) will implement the 'real' solution which I think is to introduce two new action types: DEBUG_TEST and DEBUG_TEST_STEPINTO and special case where needed. Will mark this issue as fixed (because it now works) but the 'real' fix is needed.
Comment 6 Thomas Preisler 2011-02-09 00:09:11 UTC
changeset:   188240:f9071cbbf626
user:        Thomas Preisler <thp@netbeans.org>
date:        Tue Feb 08 15:48:12 2011 -0800
summary:     # 194680 - Debug Test and Step Into Test doesn't work

changeset:   188239:856964d292c3
user:        Thomas Preisler <thp@netbeans.org>
date:        Tue Feb 08 14:37:14 2011 -0800
summary:     # 194680 - Debug Test and Step Into Test doesn't work

changeset:   188238:632200769be0
user:        Thomas Preisler <thp@netbeans.org>
date:        Tue Feb 08 14:37:00 2011 -0800
summary:     # 194680 - Debug Test and Step Into Test doesn't work

changeset:   188237:7e82cdfb7f55
user:        Thomas Preisler <thp@netbeans.org>
date:        Tue Feb 08 14:36:44 2011 -0800
summary:     # 194680 - Debug Test and Step Into Test doesn't work
Comment 7 Jesse Glick 2011-02-09 14:29:24 UTC
856964d292c3 was an unreviewed change to a widely used API, with inadequate Javadoc, no spec version increment, no changelist item, no documented use cases, and no attempt to integrate with existing project types which already successfully permit tests to be debugged using COMMAND_DEBUG (and perhaps also COMMAND_DEBUG_STEP_INTO). So please back out this change.

You are free to define and use any command names you like in cnd.makeproject. If you believe that such commands are of general utility in other project types, you can open an API review request to add them to the public API together with matching standard action registrations and uses in at least two project types.
Comment 8 Thomas Preisler 2011-02-09 15:44:32 UTC
I may have modifyied the wrong file!
Comment 9 Thomas Preisler 2011-02-09 17:32:14 UTC
Backed out 856964d292c3 and moved new Test actions to MakeActionProvider. I was not my intention to change the public project API.
Comment 10 Jesse Glick 2011-02-09 18:43:23 UTC
That sounds right.
Comment 11 soldatov 2011-02-22 10:33:26 UTC
verified in Build 201102200501