how to debug in robotlegs not knowing whether the problem lies with command, service or the event dispatching?

kimcity's Avatar

kimcity

26 May, 2012 02:40 AM

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.

  1. 2 Posted by neil on 26 May, 2012 06:30 AM

    neil's Avatar

    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.

  2. 3 Posted by kimcity on 27 May, 2012 08:20 AM

    kimcity's Avatar

    Hi Neil,

    thank you!

  3. kimcity closed this discussion on 27 May, 2012 08:20 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac