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.
Summary: | Debugging an Applet in the NetBeans IDE resets the card service | ||
---|---|---|---|
Product: | javacard | Reporter: | Benjamin_Gittins |
Component: | Java Card | Assignee: | onkentes |
Status: | NEW --- | ||
Severity: | normal | CC: | ankinelaturu, Benjamin_Gittins |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Benjamin_Gittins
2011-01-07 13:58:32 UTC
Adding Anki from the Java Card team to CC. @Benjamin: I recall this issue generally: If the emulator is running, but it is not in debug mode, then there are no ports open for the debugger to attach to. So the IDE has to restart the emulator in debug mode to debug anything. However, if the emulator is already running in debug mode (you can start it that way on the Services tab), then trying to debug PB *should* not cause the emulator to be restarted (I have no recollection of whether that really means it *won't* be, but I remember writing the calls to check if the emulator is already running in debug mode, so the IDE is certainly capable of detecting that state and not trying to restart it). As a workaround, you may be able to - Start the emulator in debug mode (if necessary, hack $JC_SDK/platform.properties which defines the command line - I wrote pretty extensive docs for how this all works here - http://wiki.netbeans.org/JavaCardPlatformIntegration ) - Attach the NetBeans debugger to the running process - Send whatever query you want to trigger a breakpoint using the emulator console (In reply to comment #1) > Adding Anki from the Java Card team to CC. > > @Benjamin: I recall this issue generally: If the emulator is running, but it > is not in debug mode, then there are no ports open for the debugger to attach > to. So the IDE has to restart the emulator in debug mode to debug anything. > > However, if the emulator is already running in debug mode (you can start it > that way on the Services tab), then trying to debug PB *should* not cause the > emulator to be restarted (I have no recollection of whether that really means > it *won't* be, but I remember writing the calls to check if the emulator is > already running in debug mode, so the IDE is certainly capable of detecting > that state and not trying to restart it). > > As a workaround, you may be able to > - Start the emulator in debug mode (if necessary, hack > $JC_SDK/platform.properties which defines the command line - I wrote pretty > extensive docs for how this all works here - > http://wiki.netbeans.org/JavaCardPlatformIntegration ) > - Attach the NetBeans debugger to the running process > - Send whatever query you want to trigger a breakpoint using the emulator > console Hi. I found the "Default Device.jcard" file in the not so obvious location of: "Documents and Settings\Administrator\.netbeans\6.8\config\org-netbeans-modules-javacard\servers\javacard_default" In there, i can see properties such as: "javacard.device.start.cmdline=${javacard.emulator} -debug ${debug} -suspend ${suspend} -ramsize ${javacard.device.ramSize} -e2psize ${javacard.device.e2pSize} -corsize ${javacard.device.corSize} -e2pfile ${javacard.device.eprom.file} -loggerlevel ${javacard.device.loggerLevel} -httpport ${javacard.device.httpPort} -contactedport ${javacard.device.contactedPort} -contactedprotocol ${javacard.device.apdutool.contactedProtocol} -contactlessport ${javacard.device.contactlessPort}" and "javacard.device.debugger.cmdline=${java.home}/bin/java -classpath ${javacard.debug.proxy.classpath} {{{-Djc.home=${javacard.ri.home}}}} com.sun.javacard.debugproxy.Main {{{debug}}} --listen ${javacard.device.proxy2idePort} --remote ${javacard.device.host}:${javacard.device.proxy2cjcrePort} --classpath ${class.path}" I commented out javacard.device.start.cmdline. I cut-and-paste javacard.device.debugger.cmdline and renamed it javacard.device.start.cmdline. I restarted the development environment. Running the debugger still reset the package. Any suggestions on what i need to do?? -------- > However, if the emulator is already running in debug mode (you can start it > that way on the Services tab), I could not find any way through the GUI to start the emulator in debug mode through the services tab. Can you deploy and then use Debug > Attach Debugger to attach to the running VM? this issue requires more evaluation Decreasing the priority as the issue affects just a particular use case and workaround exists. changing owner |