tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/581-how-to-debug-in-robotlegs-not-knowing-whether-the-problem-lies-with-command-service-or-the-event-dispatchingRobotlegs: Discussion 2018-10-18T16:35:40Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/162425632012-05-26T02:40:28Z2012-05-26T02:40:28Zhow to debug in robotlegs not knowing whether the problem lies with command, service or the event dispatching?<div><p>My desktop app does this.</p>
<p>1) User drag and drop a bunch of files. App will automatically
zip up the bunch of files and store the new zipped file inside
File.applicationStorageDirectory.resolvePath</p>
<p>2) Once the zipped file is created successfully, it will be
uploaded to my web application I build using PHP.</p>
<p>What works?<br>
1) is working because I can see the zipped file in LocalStore
folder.</p>
<p>2) is not working.</p>
<p>What are my steps to accomplish 2) ?</p>
<p>a) Inside my BaseGenerationService that creates the zipped file,
I will dispatch FileCreatedEvent once the File is created
successfully.</p>
<p>b) I have a PublishService and PublishZipFileCommand that will
call publishZipFile function in the Service. I have mapped the
event FileCreatedEvent to the Command using CommandMap.</p>
<p>I think I need to debug the following:<br>
Is the FileCreatedEvent dispatched properly?<br>
Did the PublishZipFileCommand get called properly?<br>
Is the publishZipFile function called properly?</p>
<p>I have no idea how to debug the above.</p>
<p>Usually in web programming, I just leave a bunch of echo or
debug lines around where I suspect the code is not executed.</p>
<p>I am not sure what is the equivalent of that in robotlegs.</p>
<p>Thank you.</p></div>kimcitytag:robotlegs.tenderapp.com,2009-10-18:Comment/162425632012-05-26T06:30:18Z2012-05-26T06:30:18Zhow to debug in robotlegs not knowing whether the problem lies with command, service or the event dispatching?<div><p>Hi, this is more an AS3 debugging question than a robotlegs one,
yes?</p>
<p>you could:</p>
<p>a) use trace("hello ") statement - same as echo / print<br>
B) add breakpoint to a line to check that it gets called.</p></div>neiltag:robotlegs.tenderapp.com,2009-10-18:Comment/162425632012-05-27T08:20:03Z2012-05-27T08:20:03Zhow to debug in robotlegs not knowing whether the problem lies with command, service or the event dispatching?<div><p>Hi Neil,</p>
<p>thank you!</p></div>kimcity