Re: how to debug Mason code?
Jonathan Swartz <[email protected]> Sat, 13 Sep 2014 07:48:46 -0700
| Newsgroups | gmane.comp.web.mason.user |
|---|---|
| Message-ID | <[email protected]> |
--===============8544399438196489046== Content-Type: multipart/alternative; boundary="Apple-Mail=_7978BE4C-4668-4ABE-B15C-039E067B98D9" --Apple-Mail=_7978BE4C-4668-4ABE-B15C-039E067B98D9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii What web framework is this - mod_perl? On Sep 11, 2014, at 2:58 AM, -, - <[email protected]> wrote: > Dear Mason-users! >=20 > I'm a software developer from Hungary. We've got a large code which is = a mix of HTML, Perl, and special Mason commands. Our task is to = understand, maintain and develop this code. >=20 > My question: is there any tool out there which we were able to debug = our code effectivly? We would like to use breakpoints, step into and = step over functions, watch variables while the code is running = line-by-line, etc... > Or... is there any way for example to force Komodo or Eclipse to = handle/able to debug Mason code?=20 >=20 > Our giant code has the structure shown below: >=20 > <script type=3D"text/javascript"> > function validateform() { > var example1 =3D /example/; > var example2 =3D example; > <JAVASCRIPT CODE HERE> > (function($) { > $(document).ready(function(){ > var msg =3D '<% $message %>'; > }); > })(jQuery); > </script> >=20 > <link rel=3D"stylesheet" type=3D"text/css" href=3D"css/stylesheet.css" = /> > <div id=3D"debug" style=3D"display:none"></div> > % if ($info->{attr_changed} =3D~ /y/) { > <div class=3D"alert-status" > > <EXAMPLE> > </div> > % } >=20 >=20 > <%method example> > <%init> > my $f =3D $path; > my $result =3D open my $fh, "<", $f; >=20 > if(!$result) { > die "Couldn't open '".$f."' for reading because: ".$!; > } >=20 > my $line_counter; > while(!eof $fh) { > $line_counter++; > my $line =3D readline $fh; > if (index($line, $userinput) > 0) { > print "EXAMPLE"\n"; > print "\n" . $line =3D~ = m/($userinput)/; > } > } > </%init> > </%method> >=20 >=20 >=20 > We would like to debug our Mason/Javascript/Perl code line-by-line and = watching the variables meanwhile. Is it possible? > Our problem is that for example Firebug never displays the mason = scripts and the Perl code... so I'm unable to put breakpoints into the = code, etc. >=20 > Please help! >=20 > Thank you very much for your answer, > Regards, > Zoltan Trencsenyi > = --------------------------------------------------------------------------= ---- > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > = http://pubads.g.doubleclick.net/gampad/clk?id=3D157508191&iu=3D/4140/ostg.= clktrk_______________________________________________ > Mason-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mason-users --Apple-Mail=_7978BE4C-4668-4ABE-B15C-039E067B98D9 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: = after-white-space;"><div>What web framework is this - = mod_perl?</div><br><div><div>On Sep 11, 2014, at 2:58 AM, -, - <<a = href=3D"mailto:[email protected]">[email protected]</a>> = wrote:</div><br class=3D"Apple-interchange-newline"><blockquote = type=3D"cite"><div dir=3D"ltr"><font face=3D"arial, sans-serif">Dear = Mason-users!</font><br><div = style=3D"font-size:13px;font-family:arial,sans-serif"><span = style=3D"font-family: 'Times New Roman'; font-size: = 12px;"><br></span></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><span = style=3D"font-family: 'Times New Roman'; font-size: 12px;">I'm a = software developer from Hungary. </span><span style=3D"font-family: = 'Times New Roman'; font-size: 12px;">We've got a large code which = is </span><span style=3D"font-family: 'Times New Roman'; font-size: = 12px;">a mix of HTML, Perl, and special Mason commands. Our task is to = understand, maintain and develop this code.</span></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><span = style=3D"font-family: 'Times New Roman'; font-size: = 12px;"><br></span></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3">My question: is there any tool out there which we = were able to debug our code effectivly? We would like to use = breakpoints, step into and step over functions, watch variables while = the code is running line-by-line, etc...</font></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3">Or... is there any way for example to force Komodo = or Eclipse to handle/able to debug Mason code? </font></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3"><br></font></div><div><font face=3D"Times New = Roman" size=3D"3">Our giant code has the structure shown = below:</font></div><div><font face=3D"Times New Roman" = size=3D"3"><br></font></div><div><font face=3D"Times New Roman" = size=3D"3"><div><script type=3D"text/javascript"></div><div> = function validateform() {</div><div> = var example1 =3D /example/;</div><div> = var example2 =3D example;</div><div> = <JAVASCRIPT CODE HERE></div><div> (function($) = {<br></div><div> = $(document).ready(function(){</div><div> = var msg =3D '<% $message %>';</div><div> = });<br></div><div> = })(jQuery);</div><div></script></div><div><br></div><div><link = rel=3D"stylesheet" type=3D"text/css" href=3D"css/stylesheet.css" = /></div><div><div id=3D"debug" = style=3D"display:none"></div></div><div>% if = ($info->{attr_changed} =3D~ /y/) {</div><div> <div = class=3D"alert-status" ></div><div> = <EXAMPLE></div><div> </div></div><div>% = }</div><div><br></div><div><br></div><div><%method = example></div><div> <%init></div><div> = my $f =3D $path;</div><div> = my $result =3D open my $fh, "<", = $f;</div><div><br></div><div> = if(!$result) {</div><div><span class=3D"" style=3D"white-space:pre">= </span>die "Couldn't open '".$f."' for reading because: = ".$!;</div><div> = }</div><div><br></div><div> = my $line_counter;</div><div> = while(!eof $fh) = {</div><div><span class=3D"" style=3D"white-space:pre"> = </span>$line_counter++;</div><div> = my $line =3D = readline $fh;</div><div><span class=3D"" style=3D"white-space:pre"> = </span>if (index($line, $userinput) > 0) = {</div><div> = = print "EXAMPLE"\n";</div><div> = = print "\n" . = $line =3D~ m/($userinput)/;</div><div> = = }</div><div>}</div><div> = </%init></div><div></%method></div></font></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3"><br></font></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><br></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3"><br></font></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3">We would like to debug our Mason/Javascript/Perl = code line-by-line and watching the variables meanwhile. Is it = possible?</font></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3">Our problem is that for example Firebug never = displays the mason scripts and the Perl code... so I'm unable to put = breakpoints into the code, etc.</font></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><br></div><div = style=3D"font-size:13px;font-family:arial,sans-serif">Please = help!</div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3"><br></font></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3">Thank you very much for your = answer,</font></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3">Regards,</font></div><div = style=3D"font-size:13px;font-family:arial,sans-serif"><font face=3D"Times = New Roman" size=3D"3">Zoltan Trencsenyi</font></div></div> = --------------------------------------------------------------------------= ----<br>Want excitement?<br>Manually upgrade your production = database.<br>When you want reliability, choose Perforce<br>Perforce = version control. Predictably reliable.<br><a = href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D157508191&iu=3D= /4140/ostg.clktrk_______________________________________________">http://p= ubads.g.doubleclick.net/gampad/clk?id=3D157508191&iu=3D/4140/ostg.clkt= rk_______________________________________________</a><br>Mason-users = mailing = list<br>[email protected]<br>https://lists.sourceforge.net= /lists/listinfo/mason-users<br></blockquote></div><br></body></html>= --Apple-Mail=_7978BE4C-4668-4ABE-B15C-039E067B98D9-- --===============8544399438196489046== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk --===============8544399438196489046== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Mason-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mason-users --===============8544399438196489046==--