LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-25-2011, 09:21 AM   #1
xeon123
Member
 
Registered: Sep 2006
Posts: 374

Rep: Reputation: 16
attach source code to a remote debug


Hi,

I'm running a java application in a remote site, and I would like to debug the application. I'm using jdb, and, due to network architecture, I can only use jdb do debug in text-mode.

To debug in text-mode I use the command:
jdb -attach remotesite: port.

At this point this is ok. Now I would like to attach the source code to the jdb. I tried the command
jdb -attach remotesite: port ~/src/org/path/file.java

to attach the source code to the remote debug to. But it doesn't work.

In jdb, I try the command
use ~/src/org/path/file.java

but it doesn't work either.

How can I attach the source code to the remote debug?
 
Old 05-25-2011, 10:10 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
I hate to say it, but I honestly think your best bet is to set up your environment so that you can use something like vncserver to debug locally.

At a minimum, you might need to copy your source locally. At which point you should be able to use jdb "-sourcepath xyz:abc:123".

ANYWAY:
Some of these links might help:

* http://download.oracle.com/javase/1....ndows/jdb.html

* http://jdee.sourceforge.net/jdedoc/h...ug/jdb-ug.html

* http://download.oracle.com/javase/1....cs/guide/jpda/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unsuccessful debug using Makefile during integration of cpp code to c code eryn Programming 4 05-13-2010 09:36 PM
How to attach a kernel module with kernel source code Gourab Das Linux - Kernel 2 02-04-2010 07:19 AM
about `make` and debug source code naihe2010 Programming 9 12-13-2005 05:03 AM
can't attach to DCOP server from remote machine cheema Linux - Software 0 08-30-2005 11:09 AM
How can i attach my code with send mail server ? irfanyar Linux - General 1 03-14-2004 03:42 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration