• Post Reply Bookmark Topic Watch Topic
  • New Topic

Remote debugging a STANDALONE application on server side  RSS feed

 
Z Sugiarto
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SITUATION:
----------

web application sitting on a server box, there's a batch process running in the background being managed by a single Java class - this in turns spawns multiple threads that monitors different things. I need to debug this class.

The class is started by running a script, which will first try to stop any running background processes, if any exisst, it'll stop it, once done, it'll just start it up.

PROBLEM:
--------
I want to start this class (call it BatchMain) in such a way so that I can debug it remotely from my workstation.

Currently I tried the following parameter (in the script):



AND it won't even start class. (If it did, it will be registered as a system process, and I will be able to grab it via ps -ef)


Am I missing something here?
 
Bjorn Svensson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Zenikko Sugiarto:


AND it won't even start class. (If it did, it will be registered as a system process, and I will be able to grab it via ps -ef)

I assume that it does work normally, so it is the debug-part of the
separate process that is a problem. (Otherwise there is a multitude
of things that can go wrong when kicking the script, see:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html)

In this case it would be good to see the concole output of the prog,
perhaps the port (8888) was busy or some other (unknown) problem.
On a unix box add something like '> /tmp/debug.out' or similar to have
it to a file.

In general your args are ok, if you want to see what happens form scratch
consider suspend=y to have a breakpoint at top of main().
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!