• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Debugger in Java

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I want to make a debugger with remote debugging option in Java.Can somebody give some pointers like which API to use and sample code.And I also need to know the theory behind debugging.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not an advanced question. Please choose an appropriate forum more carefully. Moving...
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JVM has an interface called JVMTI (Java Virtual Machine Tool Interface) which is the interface you'll want to use if you're going to write a debugger for Java.

You could have a look at the source code for Eclipse or NetBeans, two open-source IDEs which both have very good debuggers built-in.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's an excellent standalone debugger called JSwat which you can study. Is there a particular reason you're trying to build one yourself instead of using one of the existing ones? It'll be quite a project.
 
K Gupta
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ...

@Ulf : Yes I know it will be quite a project but I want to make one as I have some specific requirements. Can you guide me toward some theory of debugger i.e how it works etc.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you tell us a bit about those special requirements? I am betting that it will be easier to start with something like JSwat and incorporating those than to roll your own from scratch. If those features could be of general interest, the lead developer of JSwat might even help you get them implemented, and incorporate them in the official version.
 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since the Java VM has its own builtin debugger, every development system I know of uses that. Which is reasonable, because about the only other way you'll be able to see inside the system and set breakpoints, etc. is to create (and debug!) your own JVM.

There's no API I'm aware of - the developer tools simply send text debugging commands to the JVM debugger and present what they pull out of the debugger's text responses. Which should mean that telnet is the simplest remote debugger of them all.

BTW, the Unix "ddd" debugger also supports Java in addition to compiled languages. It's a plugin, I think, but I believe it came already enabled in the version of ddd that came with my Fedora Linux distro.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tim Holloway:
There's no API I'm aware of



So what would you call the JVMTI ???
 
reply
    Bookmark Topic Watch Topic
  • New Topic