Discover by : UNCLE Sanchu :-) Sanchoy Kumer Shill https://www.facebook.com/dhansiritir?fref=ts
1. Connect to Oracle using Oracle SQL Developer.
1. Connect to Oracle using Oracle SQL Developer.
2. Right Click on pl/sql code like procedure,functions,packages and select "Compile for Debug".
3. Select Tools->Preferences->Debugger and then select the option "Promt for Debugger host for Database Debugging" .
4. Right click on your database connection then select "Remote debug" option.
5. In Remote debug popup, leave default port number(4000), and timeout (0 seconds) as it is, and in “Local address” field enter your local machine IP address or fully qualified machine name/hostname with domain.
6. This starts the SQL developers debugger listener. You are done with settings at SQL developer side.
7. In your java code before executing the java statement of calling pl/sql code (usually it’s statement.execute() method),
place the following code before statement.execute() method, and save it.
CallableStatement debugStatement = connection.prepareCall("begin DBMS_DEBUG_JDWP.CONNECT_TCP('ip_address', 4000); end;");
debugStatement.execute();
8. In the above code, in place of ‘ip_address’ enter local machine IP address, and leave the port 4000 as it is Done in SQL Developer.
9. Insert debug break point in PL/SQL code( in SQL Developer) and in java(in eclipse). Then start debugging in eclipse.
No comments:
Post a Comment