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 201407 - Impossible to start debugging of a CDC project
Summary: Impossible to start debugging of a CDC project
Status: CLOSED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: CDC pack (show other bugs)
Version: 7.0.1
Hardware: PC All
: P2 normal (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-29 16:56 UTC by alexander.burdukov
Modified: 2014-04-16 19:10 UTC (History)
0 users

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 alexander.burdukov 2011-08-29 16:56:42 UTC
When the user tried to start debugging of CDC projects (using Debug menu item), debugger is not attached. When the emulator stopped the log contains following error:

C:\Users\Alex\Documents\NetBeansProjects\CdcApplication1\nbproject\build-impl.
xml:1157: Failed to parse "${debug.delay}"
BUILD FAILED (total time: 22 seconds).

The problem is reside in the corresponding Ant task:

<target name="-cdc-hi-debug" if="cdc-hi-platform.trigger">
        <taskdef name="freePortRetriever" classname="org.netbeans.modules.j2me.cdc.project.savaje.FreePortRetriever" classpath="${libs.savaje-ant-utils.classpath}"/>
        <freePortRetriever debuggerPortProperty="active.debug.port"/>
        <parallel>
            <exec executable="${platform.home}/bin/emulator">
                <arg value="-cp"/>
                <arg value="${basedir}/${dist.dir}/${dist.jar}"/>
                <arg value="-Xdevice:${platform.device}"/>
                <arg value="-Xmain:${main.class}"/>
                <arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/>
                <arg value="-Xdebug"/>
            </exec>
            <property name="debug.delay" value="5000"/>
            <nb-mobility-debug address="${active.debug.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/>
        </parallel>
    </target>

Following lines are executed in parallel:

<property name="debug.delay" value="5000"/>
<nb-mobility-debug address="${active.debug.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/>

This is incorrect.

The solution is to place these two lines 
inside <sequential>...</sequential> tags.
Comment 1 Anton Chechel 2011-10-19 15:55:36 UTC
Thank you Alexander.

fixed in jet-main
http://hg.netbeans.org/jet-main/rev/28f2f7b57286
Comment 2 alexander.burdukov 2011-10-19 16:02:26 UTC
The change looks OK for me.
However, could you revert the value of debug.delay back from 5000 to 500. 5 secs is too long timeout for attaching the debugger.
Comment 3 Quality Engineering 2011-10-20 14:28:03 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/28f2f7b57286
User: Anton Chechel <manowar@netbeans.org>
Log: #201407: CDC debugging issue
Comment 4 Anton Chechel 2011-10-20 15:43:17 UTC
debug.delay reverted
http://hg.netbeans.org/jet-main/rev/b5065096e086
Comment 5 alexander.burdukov 2014-04-16 17:06:47 UTC
Was already verified on NB 7.1