Topic
  • 13 replies
  • Latest Post - ‏2012-12-06T21:49:13Z by hungple
SystemAdmin
SystemAdmin
1632 Posts

Pinned topic Data Studio not debugging and cantt apply debug point to a stored procedure

‏2012-08-27T13:01:26Z |
I imported a stored procedure to my local workspace ie. to my project. This stored procedure got stored as a .spxmi extention. So whenever I try to set debug point I am not able to apply because from my colleauges I found that to set debug point the stored procedure file extention should be .dbg and not spxmi . So I am unable to find how and where to convert this dbg file to spxmi. Or is there any way to get directly the stored procedure from database server to local workspace in .dbg format. Any other suggestion is also welcome.

Please suggest as I am not able to debug the stored procedure.
Updated on 2012-12-06T21:49:13Z at 2012-12-06T21:49:13Z by hungple
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-08-27T13:07:03Z  
    I use data studio 3.1.1 :)
  • lakshman
    lakshman
    67 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-08-27T18:41:57Z  
    I use data studio 3.1.1 :)
    Hi Chandan,

    First you need to deploy the stored procedure in debug mode(by using"Enable Debugging" option)to able to set break points and debug the stored procedure. When you invoke the debugger it automatically converts the .spxmi to .dbg. Users don't need worry about the conversion, Data Studio will automatically take care.
    Follow the below steps to deploy the procedure in the debug mode and debugging.

    1. Select the procedure
    2. right click and choose the menu option "Deploy..."

    3. It opens a "Deploy Routines Wizard, you enable debug by selecting the "Enable debugging" check box in the Deploy Options page of the Deploy Routines wizard.

    4. Once the procedure deployed successfully in the debug mode, the stored procedure icon will change and you can observer a small bug augmented.

    5. Select the same procedure again and right click and select "Debug" menu option.

    6. It will launch the debugger perspective and it opens up the stored procedure in the debug mode in an editor.

    7. Now you can put the break points in this editor and debug the procedure.

    I hope this helps, if need further details please refer the below Data Studio document links.

    http://publib.boulder.ibm.com/infocenter/dstudio/v1r1m0/index.jsp
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-08-28T08:53:49Z  
    • lakshman
    • ‏2012-08-27T18:41:57Z
    Hi Chandan,

    First you need to deploy the stored procedure in debug mode(by using"Enable Debugging" option)to able to set break points and debug the stored procedure. When you invoke the debugger it automatically converts the .spxmi to .dbg. Users don't need worry about the conversion, Data Studio will automatically take care.
    Follow the below steps to deploy the procedure in the debug mode and debugging.

    1. Select the procedure
    2. right click and choose the menu option "Deploy..."

    3. It opens a "Deploy Routines Wizard, you enable debug by selecting the "Enable debugging" check box in the Deploy Options page of the Deploy Routines wizard.

    4. Once the procedure deployed successfully in the debug mode, the stored procedure icon will change and you can observer a small bug augmented.

    5. Select the same procedure again and right click and select "Debug" menu option.

    6. It will launch the debugger perspective and it opens up the stored procedure in the debug mode in an editor.

    7. Now you can put the break points in this editor and debug the procedure.

    I hope this helps, if need further details please refer the below Data Studio document links.

    http://publib.boulder.ibm.com/infocenter/dstudio/v1r1m0/index.jsp
    I followed the steps mentioned by you but in step 6 the stored procedure didnt open at all in the editor.When we manually open the stored procedure, we get .spxmi format. Can you suggest what to do next. Let me tell you that during installation, there was an option to install Administration version and non administration version. I installed the Administration version. Is it for that it is giving problem?

    Please help.
  • lakshman
    lakshman
    67 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-08-28T13:44:18Z  
    I followed the steps mentioned by you but in step 6 the stored procedure didnt open at all in the editor.When we manually open the stored procedure, we get .spxmi format. Can you suggest what to do next. Let me tell you that during installation, there was an option to install Administration version and non administration version. I installed the Administration version. Is it for that it is giving problem?

    Please help.
    Hi Chandan,

    It shouldn't be a problem with Administration version, the stored procedure debugging functionality available on both the versions.

    Please respond to the following questions to isolate the problem ...

    Do you able to see "Debug.." menu and able to launch the debugger ?

    Do you see any errors in the "Console" view or in the error log related to session manager ?

    whats the Database server and version your trying to debug ?
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-08-28T14:34:26Z  
    • lakshman
    • ‏2012-08-28T13:44:18Z
    Hi Chandan,

    It shouldn't be a problem with Administration version, the stored procedure debugging functionality available on both the versions.

    Please respond to the following questions to isolate the problem ...

    Do you able to see "Debug.." menu and able to launch the debugger ?

    Do you see any errors in the "Console" view or in the error log related to session manager ?

    whats the Database server and version your trying to debug ?
    Yes I am able to see the debug menu and able to open debugger.No errors in console. We use DB2 server version 9.7.
    Lets do one thing you provide me your email id and time when you will be available as per Indian Standard time so that I will share my desktop and you can see the issue.
  • lakshman
    lakshman
    67 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-08-28T21:22:37Z  
    Yes I am able to see the debug menu and able to open debugger.No errors in console. We use DB2 server version 9.7.
    Lets do one thing you provide me your email id and time when you will be available as per Indian Standard time so that I will share my desktop and you can see the issue.
    As of now it looks like its one off issue we can take this off line and discuss. Please e-mail at lsakaray at us.ibm.com . We can post the details once we found the root cause issue
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-12-05T19:45:04Z  
    I have this same problem. Please post your solution, if you've found one.
  • David.Zhu
    David.Zhu
    67 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-12-06T11:35:26Z  
    I have this same problem. Please post your solution, if you've found one.
    HI,TWB,

    you can check the content in the hosts file(Windows C:\WINDOWS\system32\drivers\etc\hosts , Linux : /etc/hosts) whether has one line "IP hostname" is correctly, if through the IP can't connect to the DB2, then it will not launch the debug perspective.

    This happen usually install some virtual machine or manually change this file in mobile environment.

    If not this case, could you detail describe the what's the symptom of can't debug?

    All you can paste the log file which is <workspace>/.metadata/.log

    Thanks.
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-12-06T18:43:20Z  
    • David.Zhu
    • ‏2012-12-06T11:35:26Z
    HI,TWB,

    you can check the content in the hosts file(Windows C:\WINDOWS\system32\drivers\etc\hosts , Linux : /etc/hosts) whether has one line "IP hostname" is correctly, if through the IP can't connect to the DB2, then it will not launch the debug perspective.

    This happen usually install some virtual machine or manually change this file in mobile environment.

    If not this case, could you detail describe the what's the symptom of can't debug?

    All you can paste the log file which is <workspace>/.metadata/.log

    Thanks.
    I don't see "IP hostname" in the hosts file. I see "localhost", "jumpserver", and some entries for Rational. I've attached the .log file.

    I'm using Data Studio 3.1 and DB2 LUW v. 9.7, trying to debug a stored procedure. I deploy the SP for debugging, which gives no errors, but debug mode does not allow me to set breakpoints or step through the SP. This used to work, so I'm wondering if there is some setting that may have been changed. It no longer works for any of our developers, so I don't think the problem is on my machine. Any suggestions would be appreciated.

    Attachments

  • hungple
    hungple
    16 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-12-06T18:49:08Z  
    I don't see "IP hostname" in the hosts file. I see "localhost", "jumpserver", and some entries for Rational. I've attached the .log file.

    I'm using Data Studio 3.1 and DB2 LUW v. 9.7, trying to debug a stored procedure. I deploy the SP for debugging, which gives no errors, but debug mode does not allow me to set breakpoints or step through the SP. This used to work, so I'm wondering if there is some setting that may have been changed. It no longer works for any of our developers, so I don't think the problem is on my machine. Any suggestions would be appreciated.
    Hi TWB,

    Your .log does not contain enough information for us to understand the problem. Please follow the instruction below and resend us your .log.

    Enabling trace for debug client ODS v2.2.1 or later
    To enable tracing in the plug-in, ODS needs to be started with an additional option “-debug”. You can start it like this:

    eclipse -debug file:c:\spdtrace.txt

    where C:\spdtrace.txt has the following content:

    com.ibm.debug.spd/debug=true
    com.ibm.debug.spd/debug/logging=true
    com.ibm.debug.spd/debug/events=true
    org.eclipse.jdt.debug/debug=true
    org.eclipse.jdt.debug/debug/jdiEvents=true
    org.eclipse.jdt.debug/debug/jdiRequestTimes=true
    org.eclipse.jdt.debug/debug/astEvaluations=true
    org.eclipse.jdt.debug/debug/astEvaluations/callingThreads=true
    org.eclipse.debug.core/debug=true
    org.eclipse.debug.core/debug/commands=true
    org.eclipse.debug.core/debug/events=true
    com.ibm.debug.spd.oracle/debug=true
    com.ibm.debug.spd.oracle/debug/logging=true
    com.ibm.debug.spd.oracle/debug/events=true

    The tracing information will be saved in the workspace .log file:

    <workspace>\.metadata\.log

    Sample of debug client trace is showed below:

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.544
    !MESSAGE RoutineDebugAction - profileName: 'hotel58'

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.549
    !MESSAGE RoutineDebugAction - launchName: IBM.Routine.Debugger

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.561
    !MESSAGE
    SPDLaunchConfigurationDelegate.launch: Routine debugger is initializing... *****

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.564
    !MESSAGE SPDLaunchConfigurationDelegate.launch: CODE LEVEL: 110525

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.567
    !MESSAGE SPDLaunchConfigurationDelegate.launch: checking language...
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-12-06T19:46:14Z  
    • hungple
    • ‏2012-12-06T18:49:08Z
    Hi TWB,

    Your .log does not contain enough information for us to understand the problem. Please follow the instruction below and resend us your .log.

    Enabling trace for debug client ODS v2.2.1 or later
    To enable tracing in the plug-in, ODS needs to be started with an additional option “-debug”. You can start it like this:

    eclipse -debug file:c:\spdtrace.txt

    where C:\spdtrace.txt has the following content:

    com.ibm.debug.spd/debug=true
    com.ibm.debug.spd/debug/logging=true
    com.ibm.debug.spd/debug/events=true
    org.eclipse.jdt.debug/debug=true
    org.eclipse.jdt.debug/debug/jdiEvents=true
    org.eclipse.jdt.debug/debug/jdiRequestTimes=true
    org.eclipse.jdt.debug/debug/astEvaluations=true
    org.eclipse.jdt.debug/debug/astEvaluations/callingThreads=true
    org.eclipse.debug.core/debug=true
    org.eclipse.debug.core/debug/commands=true
    org.eclipse.debug.core/debug/events=true
    com.ibm.debug.spd.oracle/debug=true
    com.ibm.debug.spd.oracle/debug/logging=true
    com.ibm.debug.spd.oracle/debug/events=true

    The tracing information will be saved in the workspace .log file:

    <workspace>\.metadata\.log

    Sample of debug client trace is showed below:

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.544
    !MESSAGE RoutineDebugAction - profileName: 'hotel58'

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.549
    !MESSAGE RoutineDebugAction - launchName: IBM.Routine.Debugger

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.561
    !MESSAGE
    SPDLaunchConfigurationDelegate.launch: Routine debugger is initializing... *****

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.564
    !MESSAGE SPDLaunchConfigurationDelegate.launch: CODE LEVEL: 110525

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.567
    !MESSAGE SPDLaunchConfigurationDelegate.launch: checking language...
    Okay, I've attached the new .log file.

    Attachments

  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-12-06T20:04:55Z  
    • hungple
    • ‏2012-12-06T18:49:08Z
    Hi TWB,

    Your .log does not contain enough information for us to understand the problem. Please follow the instruction below and resend us your .log.

    Enabling trace for debug client ODS v2.2.1 or later
    To enable tracing in the plug-in, ODS needs to be started with an additional option “-debug”. You can start it like this:

    eclipse -debug file:c:\spdtrace.txt

    where C:\spdtrace.txt has the following content:

    com.ibm.debug.spd/debug=true
    com.ibm.debug.spd/debug/logging=true
    com.ibm.debug.spd/debug/events=true
    org.eclipse.jdt.debug/debug=true
    org.eclipse.jdt.debug/debug/jdiEvents=true
    org.eclipse.jdt.debug/debug/jdiRequestTimes=true
    org.eclipse.jdt.debug/debug/astEvaluations=true
    org.eclipse.jdt.debug/debug/astEvaluations/callingThreads=true
    org.eclipse.debug.core/debug=true
    org.eclipse.debug.core/debug/commands=true
    org.eclipse.debug.core/debug/events=true
    com.ibm.debug.spd.oracle/debug=true
    com.ibm.debug.spd.oracle/debug/logging=true
    com.ibm.debug.spd.oracle/debug/events=true

    The tracing information will be saved in the workspace .log file:

    <workspace>\.metadata\.log

    Sample of debug client trace is showed below:

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.544
    !MESSAGE RoutineDebugAction - profileName: 'hotel58'

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.549
    !MESSAGE RoutineDebugAction - launchName: IBM.Routine.Debugger

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.561
    !MESSAGE
    SPDLaunchConfigurationDelegate.launch: Routine debugger is initializing... *****

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.564
    !MESSAGE SPDLaunchConfigurationDelegate.launch: CODE LEVEL: 110525

    !ENTRY com.ibm.debug.spd 1 0 2012-02-08 11:13:12.567
    !MESSAGE SPDLaunchConfigurationDelegate.launch: checking language...
    Sorry, this is the full .log file. I didn't go beyond the screen where I enter the parameters for the SP, because it causes an endless loop and locks things up in the DB if I go past that point. The log shows some connection timeouts.

    Attachments

  • hungple
    hungple
    16 Posts

    Re: Data Studio not debugging and cantt apply debug point to a stored procedure

    ‏2012-12-06T21:49:13Z  
    Sorry, this is the full .log file. I didn't go beyond the screen where I enter the parameters for the SP, because it causes an endless loop and locks things up in the DB if I go past that point. The log shows some connection timeouts.
    Hi TWB,

    Right. Somehow the client can't connect to session manager on the database server. Is there any firewall that blocks TCP/IP communication from the client/your Data Studio to your DB2 machine?

    !ENTRY com.ibm.debug.spd 1 0 2012-12-06 14:58:17.158
    !MESSAGE Connection timed out: connect
    !STACK 0
    java.net.ConnectException: Connection timed out: connect
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at com.ibm.debug.spd.internal.core.SessionManagerWrapperForServerMgr.reqInitializeClient(Unknown Source)
    at com.ibm.debug.spd.internal.core.ClientSessionManager.initialize(Unknown Source)
    at com.ibm.debug.spd.internal.launch.SPDLaunchConfigurationDelegate$1.initializeDebugger(Unknown Source)
    at com.ibm.debug.spd.internal.launch.SPDLaunchConfigurationDelegate$1.access$0(Unknown Source)
    at com.ibm.debug.spd.internal.launch.SPDLaunchConfigurationDelegate$1$1.run(Unknown Source)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Unknown Source)

    !ENTRY com.ibm.debug.spd 1 0 2012-12-06 14:58:17.158
    !MESSAGE ClientSessionManager.initialize() got IOException calling InitializeClient_TCP java.net.ConnectException: Connection timed out: connect