Bug 188772 - breakpoints not fired while an application in debug mode
Summary: breakpoints not fired while an application in debug mode
Status: VERIFIED DUPLICATE of bug 174804
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.2.2   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-23 16:46 EDT by Jeremy Brown CLA
Modified: 2007-07-29 09:22 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Brown CLA 2007-05-23 16:46:00 EDT
In Eclipse 3.2.2 I'm unable to get a simple Java application to launch in debug mode and stop at breakpoints that I've specified in the editor.

Here's an example:

I create a new workspace at "/Users/jeremy/workspace".  It's totally empty.  New Project of type "Java Project".  We'll call it "TestProject".  It'll use the 1.4 JVM and we'll keep source and class files in the same folder.

I create a new class, "TestClass" in the default package.  We'll make it simple:


public class TestClass {

	public static void main(String[] args) {
		System.out.println("Hi!");
	}

}



It runs fine from Eclipse.  Set a breakpoint on my "println" statement.  Then Debug As->Java Application.

Now Eclipse hangs for about 15 seconds, then displays in the console:

Transport error, error code = -1
Hi!


I've tried launching the application externally and connecting to it from Eclipse, say with a line like:

vg0201a-dhcp156:~/workspace/TestProject jeremy$ java -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y TestClass


Then I connect to the instance with jdb:

vg0201a-dhcp156:~ jeremy$ jdb -attach localhost:8787
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
Initializing jdb ...
> 
VM Started: No frames on the current call stack

main[1] run
> 
The application exited


The app works fine.  But when I start the app and try to connect Eclipse to it for remote debugging, I get:

An internal error occurred during: "Launching"

And the console displays:

Transport error, error code = -1
Hi!
Comment 1 Darin Wright CLA 2007-05-23 16:59:41 EDT
Likely a dup of bug 174804.

See README entry:

Debugging on MacOS requires manual change to eclipse.ini
In order for the Eclipse Java debugger to use its own JDI implementation, the boot path of Eclipse must be modified. This requires editing the eclipse.ini file to reference the correct version of the Java debug plug-in's JDI jar. The correct version for 3.2.2 is org.eclipse.jdt.debug_3.2.2.r322_v20070130/jdi.jar. An updated version of the eclipse.ini file can be found on bug 174804.


*** This bug has been marked as a duplicate of bug 174804 ***
Comment 2 Jeremy Brown CLA 2007-05-23 17:15:25 EDT
Thanks...I'd checked the readme that shipped with Eclipse but didn't realize there was a "live" version I needed to check as well.  Changing the eclipse.ini did fix this for me.  Sorry to bug you guys, and thanks again.
Comment 3 Eclipse Webmaster CLA 2007-07-29 09:22:52 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991