2016-04-28 4 views
0

私はpowerbuilder 11.2を使用していますが、メイン画面を作成するpblがあります。ユーザーはテキストボックスに注文番号を入力し、Enterキーを押して画面の下部にあるデータを入力します。私は自分の関数でブレークポイントにヒットするためにデバッグをしようとしていますが、ブレークポイントを無視しているようです。機能に侵入する方法はありますか?私は評価する必要がある変数を持っており、実行中は関数に入ることができないようです。ここでは、コードです:ファンクションブレークポイントのデバッグにヒットしません。

Decimal{2} ld_total_hrs,ld_load_hrs,ld_unload_hrs 
long   ll_stops_rowcount, ll_row, ll_type, ll_ord_number, ll_rd_rowcount 
datetime  ldt_1st_stop, ldt_last_stop, ldt_start_time, ldt_end_time, ldt_deliver_time 
string  ls_dest_id, ls_type, ls_pay_id, ls_ref_number, ls_pay_leg_config 
boolean  lb_first_drop = TRUE 

ld_load_hrs = 0 
ld_unload_hrs = 0 
SetNull(ldt_deliver_time) 
ll_stops_rowcount = dw_trip.RowCount() 

If ll_stops_rowcount < 1 then Return 0 

For ll_row = 1 to ll_stops_rowcount 
    If ll_row = 1 then 
     ldt_1st_stop = dw_trip.GetItemDateTime (1, "stops_stp_arrivaldate") 
    End if 

    If dw_trip.GetItemString(ll_row,"stops_stp_type") = "PUP" then 
     ldt_start_time = dw_trip.GetItemDateTime(ll_row,"stops_stp_arrivaldate") 
     ldt_end_time = dw_trip.GetItemDateTime(ll_row,"stops_stp_departuredate") 
     ld_load_hrs = ld_load_hrs + (f_datetimediff(ldt_start_time,ldt_end_time)/60)/60 
    End if 

    If dw_trip.GetItemString(ll_row,"stops_stp_type") = "DRP" then 
     ldt_start_time = dw_trip.GetItemDateTime(ll_row,"stops_stp_arrivaldate") 
     ldt_end_time = dw_trip.GetItemDateTime(ll_row,"stops_stp_departuredate") 
     ld_unload_hrs = ld_unload_hrs + (f_datetimediff(ldt_start_time,ldt_end_time)/60)/60 
     // get the first drops info for the report if paylegaslane is true else get last drop 

     ls_pay_leg_config = is_PayLegConfig 

     If is_CompanyOverride=true then 
      ls_pay_leg_config = "ByLeg" 
     End if 
     //TGRIFFIT - PayLegConfig = 'ByLeg' in TMW is equivalent to 'PayLegAsLane = 'Y' in FSS 
     if Upper(ls_pay_leg_config) = 'BYLEG' then 
      If lb_first_drop Then  
       ldt_deliver_time = ldt_end_time 
       ls_dest_id = dw_trip.GetItemString(ll_row,"stops_cmp_id") 
       ls_ref_number = dw_trip.GetItemString(ll_row,"stops_stp_refnum") 
       lb_first_drop = FALSE 
      End if 
     else 
      ldt_deliver_time = ldt_end_time 
      ls_dest_id = dw_trip.GetItemString(ll_row,"stops_cmp_id") 
      ls_ref_number = dw_trip.GetItemString(ll_row,"stops_stp_refnum") 
     end if 

    End if 

Next 

ldt_last_stop = dw_trip.GetItemDateTime (ll_stops_rowcount, "stops_stp_departuredate") 
ld_total_hrs = (f_datetimediff(ldt_1st_stop,ldt_last_stop)/60)/60 
ll_ord_number = long(dw_triptab.GetItemString(1,"ord_number")) 

//If g_messlevel% < 1 Then 
if gnv_app.ii_MessLevel < 1 Then 
    ids_revdist.Reset() 
End if 

//Load the datastore that stores all the revenue distribution values 
ll_rd_rowcount = ids_revdist.RowCount() 
ids_revdist.InsertRow(0) 
ll_rd_rowcount ++ 

ids_revdist.SetItem(ll_rd_rowcount,"mov_number",i_movenum%) 
ids_revdist.SetItem(ll_rd_rowcount,"lgh_number",dw_trip.GetItemNumber(1,"stops_lgh_number")) 
ids_revdist.SetItem(ll_rd_rowcount,"total_hours",ld_total_hrs) 
ids_revdist.SetItem(ll_rd_rowcount,"load_hours",ld_load_hrs) 
ids_revdist.SetItem(ll_rd_rowcount,"unload_hours",ld_unload_hrs) 
ids_revdist.SetItem(ll_rd_rowcount,"deliver_date",ldt_deliver_time) 
ids_revdist.SetItem(ll_rd_rowcount,"dest_code",ls_dest_id) 
ids_revdist.SetItem(ll_rd_rowcount,"ref_number",ls_ref_number) 

Return ids_revdist.RowCount() 

私は特にこの行を評価する必要があると私は、この行にブレークポイントを設定します。

ls_pay_leg_config =「ByLeg」

だけでなく、次の行。それは壊れません。私はPowerBuilderで錆びており、これを理解することができます。

+1

デバッガが不安定になると、IDEを再起動して完全再構築を試みることができます。しかし、ロジックのせいでラインに到達できない場合は、簡単にはできません。あなたはその事件が起こると確信していますか?心配すべき行が分かっていれば、GetItemString()で行にBPを置き、42行目に 'll_row = 42'のようにBPの条件を記入することができます。 BPをデバッガビューで表示し、右クリックしてBPプロパティを表示してから、「ブレークポイント...」を選択し、「条件」フィールドにコードを入力します。 'occurrence'フィールドにはどちらかを入力することができます – Seki

+0

関数を呼び出しているウィンドウに関数がなく、関数を変更した場合は、その関数を参照するすべてを再生成する必要があります。それがうまくいかない場合は、PowerBuilderが奇妙な動作をするたびにSekiの勧告が適用されます。 –

答えて

0

ループの先頭にブレークポイントを設定します。

関連する問題