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.
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
(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
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
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.