how to debug in robotlegs not knowing whether the problem lies with command, service or the event dispatching?
My desktop app does this.
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
2) Once the zipped file is created successfully, it will be uploaded to my web application I build using PHP.
What works?
1) is working because I can see the zipped file in LocalStore
folder.
2) is not working.
What are my steps to accomplish 2) ?
a) Inside my BaseGenerationService that creates the zipped file, I will dispatch FileCreatedEvent once the File is created successfully.
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.
I think I need to debug the following:
Is the FileCreatedEvent dispatched properly?
Did the PublishZipFileCommand get called properly?
Is the publishZipFile function called properly?
I have no idea how to debug the above.
Usually in web programming, I just leave a bunch of echo or debug lines around where I suspect the code is not executed.
I am not sure what is the equivalent of that in robotlegs.
Thank you.
Comments are currently closed for this discussion. You can start a new one.
2 Posted by neil on 26 May, 2012 06:30 AM
Hi, this is more an AS3 debugging question than a robotlegs one, yes?
you could:
a) use trace("hello ") statement - same as echo / print
B) add breakpoint to a line to check that it gets called.
3 Posted by kimcity on 27 May, 2012 08:20 AM
Hi Neil,
thank you!
kimcity closed this discussion on 27 May, 2012 08:20 AM.