dbTalk Databases Forums  

Event Debugging

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Event Debugging in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Brian Bagley
 
Posts: n/a

Default Event Debugging - 09-27-2006 , 12:32 PM






I am trying to debug a script task in an event, is this possible? I get a
window that opens and contains the script task from the control flow but that
is all I ever see. Any help would be appreciated. I am not sure what
additional info is needed to help diagnose this, but I will provide whatever
is needed.
--
Brian Bagley

Reply With Quote
  #2  
Old   
Charles Kangai
 
Posts: n/a

Default RE: Event Debugging - 09-27-2006 , 01:29 PM






Assuming this is SSIS - Do you want to bug the script in the task or the task
itself?
There are two things you can do:

1) Debug the task. This applies to all tasks:
Right-click on the task and choose Edit Breakpoints from the context menu.
Enable breakpoints on any events you want, e.g. OnPreExecute, OnPostExecute,
OnError. While debugging the task like this you can display the Locals window
(Debug/Windows/Locals) and watch any variables change their values.

2) You can debug the script itself. To do this open the script in VSA
(Visual Studio for Applications). Press F9 on any line where you'd like to
create the breakpoint.

Execute the package.

Hope this helps,

Charles Kangai, MCT, MCDBA
Author of Learning Tree's 4-day course: "SQL Server 2005 Integration
Services" http://www.learningtree.com/courses/134.htm
Author of Learning Tree's 4-day course: "SQL Server Reporting Services"
http://www.learningtree.com/courses/523.htm
email alias: charles
email domain: kangai.demon.co.uk


"Brian Bagley" wrote:

Quote:
I am trying to debug a script task in an event, is this possible? I get a
window that opens and contains the script task from the control flow but that
is all I ever see. Any help would be appreciated. I am not sure what
additional info is needed to help diagnose this, but I will provide whatever
is needed.
--
Brian Bagley

Reply With Quote
  #3  
Old   
Brian Bagley
 
Posts: n/a

Default RE: Event Debugging - 09-27-2006 , 01:53 PM



Hi Charles,

I was not clear, I have a package that is using the WMIEventWatcher which
raises the event WMIEventWatcherEventOccurrred. On the Event pane is where
the script I want to debug is located. I have added a breakpoint to this
Script Task. The problem is that the code is never displayed and my
breakpionts are never hit. I even added a msgbox to the script which is
executed, but I am never able to get this to display in debug mode.


--
Brian Bagley


"Charles Kangai" wrote:

Quote:
Assuming this is SSIS - Do you want to bug the script in the task or the task
itself?
There are two things you can do:

1) Debug the task. This applies to all tasks:
Right-click on the task and choose Edit Breakpoints from the context menu.
Enable breakpoints on any events you want, e.g. OnPreExecute, OnPostExecute,
OnError. While debugging the task like this you can display the Locals window
(Debug/Windows/Locals) and watch any variables change their values.

2) You can debug the script itself. To do this open the script in VSA
(Visual Studio for Applications). Press F9 on any line where you'd like to
create the breakpoint.

Execute the package.

Hope this helps,

Charles Kangai, MCT, MCDBA
Author of Learning Tree's 4-day course: "SQL Server 2005 Integration
Services" http://www.learningtree.com/courses/134.htm
Author of Learning Tree's 4-day course: "SQL Server Reporting Services"
http://www.learningtree.com/courses/523.htm
email alias: charles
email domain: kangai.demon.co.uk


"Brian Bagley" wrote:

I am trying to debug a script task in an event, is this possible? I get a
window that opens and contains the script task from the control flow but that
is all I ever see. Any help would be appreciated. I am not sure what
additional info is needed to help diagnose this, but I will provide whatever
is needed.
--
Brian Bagley

Reply With Quote
  #4  
Old   
Charles Kangai
 
Posts: n/a

Default RE: Event Debugging - 09-27-2006 , 02:26 PM



Hi Brian!

I just twigged who you are! Good to hear from you again - I enjoyed being
with you guys last week in Virginia - just this morning felt free from jet
lag!

To get back to the question: I assume you set the task property
ActionAtEvent to "Log the event and fire the SSIS event" - it's important to
have the event fire. You should also right-click the package, go into Logging
and make sure the WMIEventWatcherEventOccurred event's checkbox is checked.
You will need to set the checkboxes under Containers for both the package and
the task, although you will not specify any log providers.

I just tested it now with a script on the Event Handlers tab and it works
for me.

Cheers,


Charles Kangai, MCT, MCDBA

Author of Learning Tree's 4-day course: "SQL Server 2005 Integration
Services" http://www.learningtree.com/courses/134.htm
Author of Learning Tree's 4-day course: "SQL Server Reporting Services"
http://www.learningtree.com/courses/523.htm
email alias: charles
email domain: kangai.demon.co.uk



"Brian Bagley" wrote:

Quote:
Hi Charles,

I was not clear, I have a package that is using the WMIEventWatcher which
raises the event WMIEventWatcherEventOccurrred. On the Event pane is where
the script I want to debug is located. I have added a breakpoint to this
Script Task. The problem is that the code is never displayed and my
breakpionts are never hit. I even added a msgbox to the script which is
executed, but I am never able to get this to display in debug mode.


--
Brian Bagley


"Charles Kangai" wrote:

Assuming this is SSIS - Do you want to bug the script in the task or the task
itself?
There are two things you can do:

1) Debug the task. This applies to all tasks:
Right-click on the task and choose Edit Breakpoints from the context menu.
Enable breakpoints on any events you want, e.g. OnPreExecute, OnPostExecute,
OnError. While debugging the task like this you can display the Locals window
(Debug/Windows/Locals) and watch any variables change their values.

2) You can debug the script itself. To do this open the script in VSA
(Visual Studio for Applications). Press F9 on any line where you'd like to
create the breakpoint.

Execute the package.

Hope this helps,

Charles Kangai, MCT, MCDBA
Author of Learning Tree's 4-day course: "SQL Server 2005 Integration
Services" http://www.learningtree.com/courses/134.htm
Author of Learning Tree's 4-day course: "SQL Server Reporting Services"
http://www.learningtree.com/courses/523.htm
email alias: charles
email domain: kangai.demon.co.uk


"Brian Bagley" wrote:

I am trying to debug a script task in an event, is this possible? I get a
window that opens and contains the script task from the control flow but that
is all I ever see. Any help would be appreciated. I am not sure what
additional info is needed to help diagnose this, but I will provide whatever
is needed.
--
Brian Bagley

Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.