Announce two new product: SmartCard Reader Rockey200 and USB2.0 Extension Cable

ROCKEY 200 is a handy and portable USB Smart Card reader that can perform read/write operations on any ISO 7816-1/2/3/4 smart cards which are compatible with protocol T=0 and T=1.

USB2.0 Extension Cable With high speed USB 2.0 devices such as USB token ,USB Card Reader and so on.

Come to try it now!

Some tips for JCIDE - JCIDE Debugger

JCIDE is an Integrated Development Environment designed specifically for the Java Card programming language.

Moderators: product, kuafu

User avatar
product
Posts: 94
Joined: Wed May 20, 2015 2:04 am
Points: 416
Contact:

Some tips for JCIDE - JCIDE Debugger

Postby product » Wed Sep 02, 2015 2:00 am

The JCIDE debugger enables you to detect and diagnose errors in your programs running. It also allows you to control the execution of your program by setting breakpoints, suspending launched programs, stepping through your code, and watching the contents of variables.

1,Add Breakpoint:
In the editor area, directly to the line where you want to add the breakpoint, right-click, there pop-up menu and select "Add Breakpoint". And the breakpoint appears in the Breakpoints View list.
add_breakpoint.png


2, Watch the contents of variables:
JCIDE Debugger contains two ways of watching the contents of variables: "Quick Watch" and "Locals Watch". Select the variable you want to watch, then right-click, there pop-up menu and select "Quick Watch".
quick_watch.png


In Debugger, you can also move the pointer to the variable, it automatically pop-up a window showing the current value of the variable.
quick_watch_variable .png


You can also watch the contents of variables from the window 'Watch' and 'Locals' , as follows:

watch_window.png
You do not have the required permissions to view the files attached to this post. Please login first.

predators
Posts: 21
Joined: Wed Aug 19, 2015 7:18 am
Points: 12
Contact:

Re: Some tips for JCIDE - JCIDE Debugger

Postby predators » Tue Dec 01, 2015 1:40 am

The Debugger is very powerful.
A good develop tool.

initialdhi
Posts: 7
Joined: Mon Oct 03, 2016 4:10 am
Points: 96
Contact:

Re: Some tips for JCIDE - JCIDE Debugger

Postby initialdhi » Tue Nov 08, 2016 3:05 am

I have some problem when debug applet with JCIDE debugger ,
the problem is when i send apdu command to applet an get it with apdu.getbuffer() the data is gone? :|
like this ss
Screenshot_2.png
You do not have the required permissions to view the files attached to this post. Please login first.

Tarantino
Posts: 101
Joined: Wed Aug 19, 2015 1:56 am
Points: 474
Contact:

Re: Some tips for JCIDE - JCIDE Debugger

Postby Tarantino » Tue Nov 08, 2016 3:21 am

If you use T=0 protocol, you need to add apdu.setIncomingAndReceive() in your code.
"This method gets as many bytes as will fit without buffer overflow in the APDU buffer following the header. It gets all the incoming bytes if they fit."

Code: Select all

...
    private void verify(APDU apdu){
         byte[] buffer = apdu.getBuffer();
        apdu.setIncomingAndReceive(); //Add this command
        ...
       
The greatest glory in living lies not in never falling, but in rising every time we fall.--Nelson Mandela

initialdhi
Posts: 7
Joined: Mon Oct 03, 2016 4:10 am
Points: 96
Contact:

Re: Some tips for JCIDE - JCIDE Debugger

Postby initialdhi » Tue Nov 08, 2016 5:20 am

Tanks Tarantino, its working fine now :)


Return to “User Guide”

Who is online

Users browsing this forum: No registered users and 1 guest

JavaCard OS : Disclaimer