Help with debugging in 859

I am trying to get debugging working for a Web application. I'm running IDEA build 859 on a Windows 2000 machine. I have JRun 4 installed on the same machine. I followed instructions from another post to the forums which is copied below.

The message in the Threads pane says 'Connected to the target VM at "localhost:5005" using socket transport' so it appears to be almost working.

However, the step into and step over buttons remain disabled while I'm going through the pages of the application.

When I set breakpoints, there is no indication that execution is stopping at the breakpoint. There is also no indication of the point of execution. I set up watches, and those variables did not receive any values. They just show "???".

I did double check that breakpoints are set in places that would actually be reached in the application and I did visited pages that would cause them to be reached.

I did make sure to set debug="yes" in the javac ant task.

Any help with getting this working would be greatly appreciated.

Thanks,

Ethan

DEBUGGING INSTRUCTIONS I FOLLOWED (From Robert Hedlin, Nov 7, 2002)

1. Install IDEA
2. Install JRun4
3. Apply JRun4 Service Pack 1
4. Goto $JRUN_HOME/bin
5. Copy jvm.config to jvm.config.bak
6. Using the editor of your choice, open jvm.config
7. Locate the line starting "java.args"
8. Set this line to the following:

java.args=-Xmx128M -Xms128m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp
:transport=dt_socket,server=y,suspend=n,address=5005

(all on one line)
(change settings for -Xmx and -Xms as needed)

9. Save the file
10. Launch IDEA
11 Open your project
12 To the left of the Run Icon in the tool bar is a drop down, select Edit
entries
13 Select the Remote Tab
14 Add a new debug config by clicking on the + symbol
15 Provide a name
16 Transport should be set to Socket
17 Debugger mode should be set to Attach
18 Host should be set to the hostname of the running JRun4 (localhost if
you're running locally)
19Port should be set to 5005
20 Set two checkboxes as desired
21 Say Apply
22 Press OK

To start a debugging session
1. Build project
2. Deploy to JRun4 (we build as an EAR file and deploy to an auto-deploy
directory)
3. Start JRun4 running the appropriate server (i.e. jrun -start default)
4. Wait for JRun4 to start fully
5. From IDEA, set breakpoints as needed
6.Slect the debug session we created above in the dropdown
7.Mash the debug icon.
8. Do something to reach your break point (i.e. if debugging a servlet, open
a web browser, etc.)
9. Debug as normal.
10. Note that pressing STOP in the debugger will shutdown JRun4.

4 comments
Comment actions Permalink

If you're trying to debug jsps, you're out of luck using JRun. IDEA doesn't
support it and there's no plugin, that I know of.
If you're just trying to debug servlets and classes, I'll have to check it
out tomorrow. I haven't tried with 859 yet. Maybe a bug.

"Ethan Michaels" <emicha@mtc.ca.gov> wrote in message
news:28017792.1058924346435.JavaMail.itn@is.intellij.net...

I am trying to get debugging working for a Web application. I'm running

IDEA build 859 on a Windows 2000 machine. I have JRun 4 installed on the
same machine. I followed instructions from another post to the forums which
is copied below.
>

The message in the Threads pane says 'Connected to the target VM at

"localhost:5005" using socket transport' so it appears to be almost working.
>

However, the step into and step over buttons remain disabled while I'm

going through the pages of the application.
>

When I set breakpoints, there is no indication that execution is stopping

at the breakpoint. There is also no indication of the point of execution. I
set up watches, and those variables did not receive any values. They just
show "???".
>

I did double check that breakpoints are set in places that would actually

be reached in the application and I did visited pages that would cause them
to be reached.
>

I did make sure to set debug="yes" in the javac ant task.

>

Any help with getting this working would be greatly appreciated.

>

Thanks,

>

Ethan

>

DEBUGGING INSTRUCTIONS I FOLLOWED (From Robert Hedlin, Nov 7, 2002)

>

1. Install IDEA
2. Install JRun4
3. Apply JRun4 Service Pack 1
4. Goto $JRUN_HOME/bin
5. Copy jvm.config to jvm.config.bak
6. Using the editor of your choice, open jvm.config
7. Locate the line starting "java.args"
8. Set this line to the following:

>
>
java.args=-Xmx128M -Xms128m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp

:transport=dt_socket,server=y,suspend=n,address=5005

>

(all on one line)
(change settings for -Xmx and -Xms as needed)

>

9. Save the file
10. Launch IDEA
11 Open your project
12 To the left of the Run Icon in the tool bar is a drop down, select Edit
entries
13 Select the Remote Tab
14 Add a new debug config by clicking on the + symbol
15 Provide a name
16 Transport should be set to Socket
17 Debugger mode should be set to Attach
18 Host should be set to the hostname of the running JRun4 (localhost if
you're running locally)
19Port should be set to 5005
20 Set two checkboxes as desired
21 Say Apply
22 Press OK

>

To start a debugging session
1. Build project
2. Deploy to JRun4 (we build as an EAR file and deploy to an auto-deploy
directory)
3. Start JRun4 running the appropriate server (i.e. jrun -start default)
4. Wait for JRun4 to start fully
5. From IDEA, set breakpoints as needed
6.Slect the debug session we created above in the dropdown
7.Mash the debug icon.
8. Do something to reach your break point (i.e. if debugging a servlet,

open

a web browser, etc.)
9. Debug as normal.
10. Note that pressing STOP in the debugger will shutdown JRun4.



0
Comment actions Permalink

+If you're trying to debug jsps, you're out of luck using JRun. IDEA doesn't
support it and there's no plugin, that I know of.
If you're just trying to debug servlets and classes, I'll have to check it
out tomorrow. I haven't tried with 859 yet. Maybe a bug.+

Thanks for the reply. I'm just trying to debug non-jsp code. It this case Struts Actions and ActionForms.

0
Comment actions Permalink

Looks like you are describing the known bug already fixed in the latest sources. The fix will be available in the coming EAP build.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"



0
Comment actions Permalink

Thanks. I went back to build 833 and now it works, except that the green check marks appear on the watch points whether or not they have been reached. But the debugger works, so that's cool.

Ethan

0

Please sign in to leave a comment.