0

I'm developing a ssis package that consist of multiple task scripts and sql tasks,i'm wondering where did i make a mistake that in one of the task scrips nowhere breakpoints hits,in other scripts break points work fine and the issue only persist in one task script.

Please consider following tips Before judging and present your possible solution :

1.There is no error where i build task script
2.Script is responsible for calling a web service
3.I'm pretty sure that script runs because i used MessageBox.Show() and traced request through codes.
4.I'm using visual studio 2015 and sql server 2016.

Abolfazl
  • 1,592
  • 11
  • 32
  • This is an old (ancient) bug; upgrade to latest version of Visual Studio and Integration Services where it's finally been fixed. If you can't upgrade, you're stuck with using messageboxes. – HoneyBadger Aug 10 '20 at 14:56
  • If it's a bug why only for one script? other scripts work fine with break points – Abolfazl Aug 10 '20 at 14:59
  • Hmm, maybe a different bug then the one I had in mind ;) – HoneyBadger Aug 10 '20 at 15:00
  • 1
    Most probably, some of the solutions listed here might resolve your issue: https://stackoverflow.com/questions/41470415/debugging-ssis-script-task-breakpoint-is-enabled-but-it-does-not-hit – Roger Wolf Aug 10 '20 at 15:26
  • *"If it's a bug why only for one script? other scripts work fine with break points"* From experience, it's *very* intermittent and has a habit of "picking and chosen" where and when it wants to work. Can with certainty say that I have had the same scenario in the past. – Thom A Aug 10 '20 at 15:39

1 Answers1

0

I found it by accident ! this piece of code was source of the issue !

if(res?.Code=="0")
{
...

Apparently script was not compatible with this syntax and would cause a kind of misunderstanding for ssis and could not debug code!

?. Access method was not familiar for ssis !

I replaced that line by Following one:

if(res !=null && res.Code=="0")
Abolfazl
  • 1,592
  • 11
  • 32
  • You can upgrade your installation of VS to 2019 and use version 3.2+ of SSIS Project extension - it handles c# new language features. – Ferdipux Aug 18 '20 at 09:51