11 Replies Latest reply on Aug 22, 2016 11:22 AM by mtlrom

    debugging action script code

    mtlrom

      Hello,

       

      I'm trying to learn how to debug action script code. I'm not even sure if Animate is the tool that's supposed to do this work. I installed trial and couldn't even do anything there. In particular, I want to learn using existing project: jwplayer from github. jwplayer provides ant based build system and compiles all actionscript files into jwplayer.flash.swf. My goal is to learn how to connect to running swf in a browser, put breakpoints and step through the code while it's all loaded in a browser (preferably chrome). Up to this point from googling I figured that I need to enable debug flash player in chrome (this part seems to be done) and then I need to use debug build of jwplayer to be able to debug it. I can modify jwplayer code and print logs to console however, I have little clue how to connect to it and step through with a debugger. I installed Animate CC and there is zero hints on how to do that (or if that's the tool that I need).

       

      Thanks

        • 1. Re: debugging action script code
          mtlrom Level 1

          Do I need FlashBuilder instead? By the way, unrelated: after this my post was approved I received auto emails from adobe in some weird language, probably dutch. Here's what it said: " Hallo,  U ontvangt deze e-mail, omdat de inhoud die u hebt gepost is goedgekeurd door onze moderators. "

          • 3. Re: debugging action script code
            mtlrom Level 1

            After google, I installed FlashBuilder.

            I'll leave a couple of comments, hope it will help to improve FlashBuilder. As most of developers, I can attest and put my seal that anything that's based on Eclipse is pure pile of ****. You have a be an 80-level wizard and phd in googing to get anything working with eclipse. It seems that jwplayer comes with FlashBuilder project files, don't know why they added ".default" extensions for them, but they are FlashBuilder project files. Off course, there is no point to mention, that nothing works, on top of that I get totally ridiculous error message from that pile of crap called eclipse. After fixing some of the errors I'm stuck with this error: flash-builder.png

             

            it's just screams WTF si taht?! line 56 where? Why is that clicking on the error won't show damn nothing!? Obviously searching doesn't work at all in eclipse: in any decent editor Ctrl+Shift+F will open global search (visual studio, notepad++... whatever editor). So, I search with notepad++ for debugging and I see this:

             

               } catch (error:Error) {
               line 56 ==>> CONFIG::debugging {
               trace('js error:', error.message);
               }
               }

             

             

            why is this error cannot be viewed in freaking eclipse?! Seriously, I've been programming for more than 10 years whenever I touch anything eclipse it makes me sick. Google made right move to dump eclipse for their android studio. Adobe should also stir clear from all that crap.

            • 4. Re: debugging action script code
              mtlrom Level 1

              robdillon I cannot even build the project. It fails from the start miserably.

              Are there any normal tools (e.g. something that's not using eclipse?) Anything else that supports debugging actionscript?

               

              EDIT:

              By the way, I've figured it out how to enable that CONFIG::debugging compile option... it's just so BAD overall: no proper error to see where it comes from no hints...

              I ended up building it, but I think I won't ever be able to use eclipse for debugging. It has completely messed up shortcuts. As a great "convenience" eclipse offers Emacs shortcuts. Where is visual studio shortcut layout?! Or flashbuilder developers are meant to use mouse to step through the code?

               

               

              In any case, I really don't see how that could even work in the end: even if I built final player.swf I cannot do anything with it: eclipse rediculously won't even offer me post build events to be able to rename output file and copy where it's supposed to be so that if I open my page in chrome it would use newly built player.

              Complete fail. I think I'd rather go learn some other language...

               

              Can somebody more my question to FlashBuilder thread instead? I don't see that option myself

               

              EDIT2:

              The links on how to debug actionscript with or without errors are totally unrelated to me. I though it was quite obvious and clear what I'm trying to do: debug actionscript in a jwplayer (or any other project). JWplayer is an html flash-based player. TO make it work, I have an HTML web page that references jwplayer.flash.swf and jwplayer.js and I get a video player on a page. So, that jwplayer.flash.swf is built from bunch of action script files and I wanted to learn how to debug that stuff live on a webpage. If I right click video player I see "Debugging" context menu, and it offers to connect to debugger.

              In any case, it appears that flashbuild cannot even build properly How is that even possible, that same jwplayer if build with ant+flex sdk works, and if I build in flash builder it fails: my page just doesn't load anything, it totally gets stuck, no progress, no error messages.

              • 5. Re: debugging action script code
                robdillon Most Valuable Participant

                Flash, now Animate, and Flash Builder are completely different products. If you want to find useful answers to questions about Flash Builder then a better place to look is in the Flash Builder forum: Using Flash Builder

                • 6. Re: debugging action script code
                  ClayUUID Adobe Community Professional

                  mtlrom wrote:

                   

                  The links on how to debug actionscript with or without errors are totally unrelated to me.

                  Then perhaps you should have titled this thread "debugging jwplayer" instead of "debugging action script code".

                  • 7. Re: debugging action script code
                    mtlrom Level 1

                    Flash, now Animate, and Flash Builder are completely different products. If you want to find useful answers to questions about Flash Builder then a better place to look is in the Flash Builder forum: Using Flash Builder

                    This is the point of the question: how do I debug. I think it's ok to assume that somebody from adobe or on adobe forums could possibly know that and tell me that. So, I'm not even sure what I need to use to debug actonscript inside an swf running on a web page. After googling and trying FlashBuilder I'm pretty sure that this thing can do nothing of what I need to do.

                     

                    Then perhaps you should have titled this thread "debugging jwplayer" instead of "debugging action script code".

                    I'm trying to learn how to debug actonscript inside an swf running on a web page. After googling jwplayer was the one I found and decided to use. I'm totally OK to use any other project that has similar structure as jwplayer: bunch of files are compiled into swf that runs later in a browser. My goal is to be able to attach to that swf running live and put breakpoints and step through the code with actionscript debugger. That's the point of the question.

                    • 8. Re: debugging action script code
                      Colin Holgate MVP & Adobe Community Professional

                      If you want to practice the remote debugging, use a simpler test case. Find an FLA based example that you can test in Animate. When you have that going you then use the Debug menu to start the remote debugging session, and in the running swf in the browser you right-click to select debugging there. You will need to have installed the debug version of Flash Player.

                      1 person found this helpful
                      • 9. Re: debugging action script code
                        mtlrom Level 1

                        If you want to practice the remote debugging, use a simpler test case. Find an FLA based example that you can test in Animate. When you have that going you then use the Debug menu to start the remote debugging session, and in the running swf in the browser you right-click to select debugging there. You will need to have installed the debug version of Flash Player.

                        FLA+Animate is not a simpler test case - I know nothing about just like about my original swf case. In fact I don't even know what fla and swf even mean. I already installed debug version of flash player in chrome and if I right click player in the browser I have a menu option fro debugging, it offers me to connect presumably to the debugger. So, I'm trying to figure out what is supposed to be that mysterious thing that should be used for debugging? There is huge list of adobe programs out there. I'm pretty sure that it's not photoshop, can somebody say it in one word what should be used for debugging!?

                        • 10. Re: debugging action script code
                          mtlrom Level 1

                          By the way, if it matters at all, I have 10+ years of pro experience with c++. I know how to debug stuff, I just want to find out what tools are there to be used for my task. It just freaks me out that I cannot even find what tool is meant to debug actionscript that gets compiled into swf and ends up running in a browser. I'll probably will need to work an actionscript project so I'm trying to learn about it meanwhile, but it seems like it's some sort of abandonware, am I right?

                          • 11. Re: debugging action script code
                            mtlrom Level 1

                            FYI, I find that all adobe tools are complete failure. For sure Animate is a great tool if you want to do animation, but all I want is pure simple actionscript hello world app that I can compile to swf, put breakpoints and run in a browser and step through the code. Here's that hello world app: [ActionScript 3] package { import flash.display.Sprite; import flash.text.TextField; publi - Pastebin.com

                             

                            Here's relevant post on stackoverflow: flash - how do you debug actionscript that runs in browser - Stack Overflow