Studio+Update+Sites17Debugging文档格式.docx

上传人:b****6 文档编号:20312695 上传时间:2023-01-21 格式:DOCX 页数:20 大小:1.21MB
下载 相关 举报
Studio+Update+Sites17Debugging文档格式.docx_第1页
第1页 / 共20页
Studio+Update+Sites17Debugging文档格式.docx_第2页
第2页 / 共20页
Studio+Update+Sites17Debugging文档格式.docx_第3页
第3页 / 共20页
Studio+Update+Sites17Debugging文档格式.docx_第4页
第4页 / 共20页
Studio+Update+Sites17Debugging文档格式.docx_第5页
第5页 / 共20页
点击查看更多>>
下载资源
资源描述

Studio+Update+Sites17Debugging文档格式.docx

《Studio+Update+Sites17Debugging文档格式.docx》由会员分享,可在线阅读,更多相关《Studio+Update+Sites17Debugging文档格式.docx(20页珍藏版)》请在冰豆网上搜索。

Studio+Update+Sites17Debugging文档格式.docx

atanybuildingblockinyourflowthatyouwishtocheckortest(seeimagebelow).WhenyourunyourapplicationinDebugmode,theapplicationstopsimmediatelyafterexecutingthebuildingblockwiththebreakpoint.Usingthe 

MuleDebuggerView,youcanbrowsethroughthecontentsofthemessageasitexistsatthatpointintheflow,andevaluate 

MuleExpressions 

againstthemessage.

NotethattheVisualDebuggeriscompletelydistinctfromtheJavaDebuggercontainedinStudio;

infact,youmayrunbothdebuggersconcurrentlyonyourapplication.

Assumptions

Thisdocumentassumesthatyouarefamiliarwiththe 

VisualEditorinMuleStudio,particularly 

StudioBuildingBlocks. 

Reviewthe 

GettingStartedwithMuleStudio 

chaptertolearnmoreaboutdevelopingwithMuleESB'

sgraphicaluserinterface.

Prerequisites

Whendebuggingonyourlocalmachine,StudioVisualDebuggerlistensforincomingTCPconnectionsonlocalhostport6666.Thisportmustbeavailableonyourmachine,i.e.notblockedbyafirewallorothersecuritysoftware.

IfyouplantoremotelydebuganapplicationrunninginanexternalMuleESBserver,youwillneedconnectivitybetweenyourmachine(whereyourunStudioVisualDebugger)andtheESBserver'

sdebugport,bydefault6666.EnsurethattherearenoroutingissuesorfirewallsblockingaccessbetweenyourhostandtheESBserver'

sdebugport.

(Foradditionalinformationonremotedebugging,seethesection 

DebuggingRemotely 

inthispage.)

TestingconnectivitytoaremoteMuleESBserverwiththetelnetcommand

UsingtheVisualDebugger

Completethefollowingmacro-stepstousetheVisualDebuggerinStudio.

1.Set 

breakpointsonbuildingblocksinyourapplication.

2.Run 

theapplicationinDebugmode.

3.View 

and/or 

evaluate 

thedatainthefirstbuildingblockwithabreakpoint.

4.Resumeapplicationexecution.

5.Repeatstep3withthenextbuildingblockwithabreakpoint,ifany.

SettingBreakpoints

1.Right-clickabuildingblock,thenselect 

Togglebreakpoint.

2.Studioappliesareddottothebuildingblock'

sicononthecanvas.

WhenyourunyourapplicationinDebugmode,Studiostopstheflowexecutionatthebreakpointyouhaveset,allowingyoutocheckthemessagecontentsinthe 

MuleDebuggerView.

RunninginDebugMode

1.Inthe 

PackageExplorer 

pane,right-clickyourapplication,thenselect 

DebugAs 

>

MuleApplication.StudiobeginsrunningtheapplicationinDebugmode,anddisplaysthe 

ConfirmPerspectiveSwitch 

window.

2.Click 

Yes 

toopentheDebugperspective,fromwhichyoucanaccessthefullfunctionalityoftheVisualDebugger. 

ViewingMessageDataataBreakpoint

WhenyoubeginrunningyourapplicationinDebugmode,Muleopensthe 

MuleDebug 

perspective.Untilamessagearrivesatthefirstbreakpoint,theMuleDebuggerViewintheconsoledisplaysamessagethatreads,"

ConnectedwithmuleESB.Waitingforamulemessagetoarrive!

"

 

TheimagebelowillustratestheMuleDebugperspective.

Number

Description

1

MuleDebuggerView 

displaysinformationaboutamessagewhentheflowexecutionreachesabreakpoint.Intheimageabove,theapplicationrunninginDebugmodehasnotyetreceivedanymessage,soStudiodisplaysnomessageinformation.

2

MuleBreakpointWatches 

tabdisplaystheMuleBreakpointWatchespane,whereyoucanadd,removeandeditMulebreakpointwatches.

3

MuleBreakpointsView 

providesalistingofallbreakpointssetinallStudioapplications.

4

DisplaysbreakpointsintheMuleBreakpointsView.

5

Checkboxforsettingabreakpointas 

Conditional.Belowitistheinputfieldforenteringthedesiredcondition.Intheimageabove,thecheckboxandtheinputfieldaregrayed-outbecausenobreakpointisselectedintheMuleBreakpointsView.

Whenamessagearrivesatthefirstbreakpoint,the 

displaystwopanes,asshownbelow.

Theleftpanedisplaysthemessagepayload(inthiscase,anHTTPGETrequestreceivedviaan 

HTTPinboundendpoint).Therightpanedisplaysvariousmetadataassociatedwiththemessage:

∙Inbound:

messageinformation(payloadandmetadata)ifthemessageisinboundorwithinMule

∙Variables:

activeMulevariablesatexecutionbreakpoint

∙Outbound:

messageinformation(payloadandmetadata)ifthemessageisoutbound

∙Session:

activesessionvariablesatexecutionbreakpoint

Toresumeexecution,clickthe 

Resume 

icon(seebelow) 

orpress 

F8.Yourapplicationrunsuntilthemessagereachesthenextbreakpoint,ifany.

Ratherthansimplyresumingexecution,youcanchoosetogotothenextmessageprocessor,skiptoaselectedmessageprocessor,orstoptheapplication.See 

ExecutionControlTools 

forfulldetails.

MuleDebuggerView

ThissectioncontainsafulldescriptionoftheMuleDebuggerViewandallitsavailabletools.

LeftPane

Theleftpanedisplaysthemessagepayloadasatreestructure.

Remarks

Name 

columndisplaysthenameofeachmessageproperty.

Thefirstpropertydisplayedisalwaysthenameofthemessageprocessor.

Value 

column

Type 

Nameofamessageproperty.

Toseeanynestedelementsforaproperty,clickthearrownexttothepropertyname.Youcanseeallobjectsinthemessagepayload.

Valueofeachmessageproperty

Onsomemessageprocessors,youcanchangethemessagepayloadbyeditingthepayloadproperties.VisualDebuggerautomaticallystoresthemodifiedpayloadobject.Whenyouresumerunningtheapplication,themessageprogresseswiththemodifiedvalue.

Toeditamessageproperty:

1.Clickthevalueyouwishtochange.

2.Typeanewvalue.

3.Press 

Enter.

RightPane

Therightpanedisplaysmessagemetadata.

6

Inbound 

panedisplaysmessagedataifthemessageprocessorisaninboundendpoint.

7

Variables 

panedisplaysanyMulevariablecurrentlyactive.

8

Outbound 

panedisplaysmessagedataifthemessageprocessorisanoutboundendpoint.

9

Session 

panedisplaysanysessionvariablecurrentlyactive.

ExecutionControlTools

UsethetoolsdescribedinthetablebelowtoperformactionsinMuleDebugperspective.

Icon

Shortcut

10

Terminate– 

Clicktostopthecurrentlyrunningapplication.

11

EvaluateMuleExpression– 

ClicktoevaluateaMuleexpression.

Mac:

Command+SHIFT+i

LinuxandWindows:

Ctrl+SHIFT+i

12

NextProcessor– 

Clicktoruntheapplicationandstopatthenextmessageprocessorintheflow,evenifthereisnobreakpointatthenextprocessor.

F6

13

RuntoProcessor– 

Clicktoruntheapplicationandstopatthecurrentlyselectedprocessor,evenifthereisnobreakpointatthecurrentlyselectedprocessor.Emulatesthebehaviorofthe"

Runtocursor"

optioninJavadebuggers.(Toselectaprocessor,single-clickitsbuildingblockinthecanvas.)

F7

14

Resume– 

Clicktoruntheapplicationuntilthenextbreakpoint,ifany.

F8

EvaluatingMuleExpressions

CompletethefollowingstepstotestaMuleexpressionagainstthemessageprocessorsetwithabreakpoint.

1.EnsurethatStudiohasstoppedflowexecutionatthedesiredbreakpoint.Whenstopped,thebreakpointappearssurroundedbyadottedbluelineinthecanvas,andStudiopopulatesthe 

withinformation.

2.Clickthe 

EvaluateMuleExpression 

icon 

abovetheright-handpaneintheMuleDebuggerView.Studiodisplaystheexpressionevaluationwindow(withyellowbackgroundintheimagebelow).

3.TypetheMuleexpressionyouwishtoevaluateintheprovidedinputfield,thenpress 

enter.Studioevaluatestheexpression,thendisplaystheresultinthe 

Name, 

and 

columns.

Forinstance,intheexample 

above,themessageisanHTTPrequestcontainingtwoproperties, 

Symbol 

Method.Toseethevaluefor 

Method,enter 

#[message.inboundProperties['

Method'

],thenpress 

Usingtheexpressionevaluationwindow,youcanalsoeditmessagepropertiesorattributes.Simplyright-clickthepropertyvalueorattribute,typethenewvalue,thenpress 

enter.

SettingBreakpointParameters

Youcanconfigurebreakpointsaccordingtothreeparameters,describedinthetablebelow.Theseparametersaresetinthe 

MuleBreakpointsView.

Type

Default(noparameters)

Defaultconfigurationforauser-definedbreakpoint.Thebreakpointissetonauser-definedbuildingblock,andactivatedbydefault.Whenamessagereachesthebreakpointbuildingblock,StudiostopsflowexecutionanddisplaysthecontentsofthemessageintheMuleDebuggerView.

Conditional

Thebreakpointisactivatedonlyifauser-definedconditionevaluatesto 

true.

Exception

Thisisaglobalparameter.Whenset,Studiostopsflowexecution 

atanybuildingblock 

whereanexceptionoccurs.TheMuleDebuggerViewwilldisplaythemessagecontentsatthebuildingblockthatthrewtheexception.

Settheseparametersinthe 

MuleBreakpoints 

view,describedbelow.

MuleBreakpointsView

ThisviewdisplaysallbreakpointsdefinedinalltheapplicationscurrentlyopeninStudio.Toaccessthe 

view,ensurethatyouarecurrentlyinthe 

DebugPerspective.(Ifnot,click 

underthemaintoolbar).Fromt

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 研究生入学考试

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1