This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

attach source code to the remote debug

 
Greenhorn
Posts: 15
Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

Thanks,
PSC
 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.4.2/docs/tooldocs/windows/jdb.html

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

* http://download.oracle.com/javase/1.4.2/docs/guide/jpda/
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic