[ oracle ] remote debugging

add debug privileges

รูปภาพ

remote debug

1. set up remote debugger `Listener` in `SQL Developer`

Right Click at connection > Remote Debug..

NOTE : use the real IP address, not localhost, not 127.0.0.1.

listen_to_JPDA2. connect to the Listener that already created in 1)

For example, in the package, put the line

 DBMS_DEBUG_JDWP.CONNECT_TCP('192.168.XX.XX',4000);

If connection is success, the console will be like this.

connect_success_remote_debugger_sql_developerNow, we can set the breakpoint, add the watch parameter ( right click at parameter > watch ), or even modify parameter on-the-fly ( right click at the watch console > modify value ).

NOTE :

if you don’t want to face

_MSG1=ORA-30677: session is already connected to a debugger, _STATUS=S} 

disconnect before connect by using the code below

 IF DBMS_DEBUG_JDWP.CURRENT_SESSION_ID IS NOT NULL THEN
DBMS_DEBUG_JDWP.DISCONNECT();
END IF;
DBMS_DEBUG_JDWP.CONNECT_TCP('192.168.XX.XX',4000);

ref : barrymcgillin,

thatjeffsmith,

ttlnews

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s