Help Desk Software & Beyond
May 22, 2012, 01:01:06 AM *
Welcome, Guest. Please login or register.
To post messages you need to register. We apologize for inconvenience, but this is to prevent spam.
Registration is instant (no email verification) and we do not ask for any personal information.

Login with username, password and session length
News: Welcome to Help Desk Software forum!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [INFO] debugging perl modules  (Read 2961 times)
TroubleTicketUser4499
Jr. Member
**

Karma: 5
Posts: 59


View Profile
« on: May 06, 2008, 10:00:06 AM »

How may I debug certain perl modules?  I need to see a print out of certain values in TTXLayout.pm and simply typing print and then the variable will not allow me to view it in the browser.  How do others here debug?

Thank you.
« Last Edit: May 06, 2008, 10:27:11 AM by sparky672 » Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #1 on: May 06, 2008, 10:21:37 AM »

Not sure what you're trying to do here.  "Debugging" implies that you are trying to fix a bug.

I simply use a text editor when making changes.

If I need to see certain values, I output them into custom macros I create.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Alex
Administrator
Hero Member
*****

Karma: 22
Posts: 605



View Profile WWW
« Reply #2 on: May 06, 2008, 10:55:44 AM »

I use Komodo IDE (use Google search for further details). I allows debugging (i.e. step by step execution, breakpoints, inspection of variable values etc). There is also free Komodo Editor, that may be used as a Perl (and PHP) editor. Another quick approach is to use "warn" instead of "print" and watching the error log using "tail -f" command (Windows users, sorry about that Shocked)

Logged

Follow me on: LinkedIn
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #3 on: May 06, 2008, 11:05:14 AM »

There's something similar on the Mac called Affrus.  OS X has Perl built-in.

http://www.latenightsw.com/affrus/
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Alex
Administrator
Hero Member
*****

Karma: 22
Posts: 605



View Profile WWW
« Reply #4 on: May 06, 2008, 12:42:11 PM »

As a matter of fact Komodo IDE is available for Windows/Mac OSX/Linux and Trouble Ticket Express is written on Mac  Smiley
Logged

Follow me on: LinkedIn
TroubleTicketUser4499
Jr. Member
**

Karma: 5
Posts: 59


View Profile
« Reply #5 on: May 06, 2008, 02:02:14 PM »

Thank you for the input, everyone.  I'm using Windows, here.  I suppose I have to run Perl from the command line, then.  Perl.exe is actually on a remote server, and I've been using Perl Express to point to it.  Debugging and running it from within the program gives me errors.  For example, running ttx.cgi (in perl express) gives me this:

Quote
Content-type: text/html

<html>
<body>
<br><br>
<font color=red><b>Fatal error:</b></font>
Incomplete package. Please upload all *.cgi and *.pm files to your web server
<br><br>
<a href="http://ttx.helpdeskconnect.com"><b>Trouble Ticket Express Help Desk</b></a>
</body>
</html>

Now, as far as I know, I have all the packages and libraries for perl and TroubleTicket.  I have no problems running it from a client web browser.  Anyway, point being, I gather I have to specify inputs to the ttx.cgi file, which I'm assuming links all the packages together. If I'm correct, then question becomes what's the minimum set of inputs that I must specify to run/debug ttx.cgi? 

At this point, I want to use the dubugger as an aid to decipher how this program works from behind-the-scenes.

Thank you.
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #6 on: May 06, 2008, 02:03:44 PM »

As a matter of fact Komodo IDE is available for Windows/Mac OSX/Linux and Trouble Ticket Express is written on Mac  Smiley

I'll have to check into that Komodo IDE.

Written on a Mac?  That explains the nice & tight TTX interface.   Wink

I remember you saying that you were looking for some Macs last year.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #7 on: May 06, 2008, 02:12:34 PM »

I'm using Windows, here.  I suppose I have to run Perl from the command line, then.  Perl.exe is actually on a remote server, and I've been using Perl Express to point to it.  Debugging and running it from within the program gives me errors.

Good points/questions.  I had similar issues running TTX within Affrus.


Editing Perl and writing modifications was easier for me the "hard" way...

... just do it, upload it, and try it out.


Although I can see how these tools would come in very handy as soon as I learn how to properly use them.  Wink
« Last Edit: May 06, 2008, 02:45:25 PM by sparky672 » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #8 on: May 06, 2008, 03:47:12 PM »

Alex-

I just installed Komodo.  I put a folder on my Mac desktop which contains all the TTX files.  I gave this folder and all its contents 777 permissions.

I opened "setup.cgi" in Komodo and run debug.

I can then see the TTX Setup page in the HTML preview window.

Now I'm stuck.

When I click on the "Use Default Data Directory" button on the page in the preview window, I get a "file not found error".  It says that "/setup.cgi" cannot be found.  I don't understand the error since that's the file I have open already in Komodo.

What am I doing wrong?

Thanks.
« Last Edit: May 06, 2008, 03:49:21 PM by sparky672 » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Alex
Administrator
Hero Member
*****

Karma: 22
Posts: 605



View Profile WWW
« Reply #9 on: May 07, 2008, 07:38:38 AM »

Just enter this line into the Komodo Help search box

CGI Debugging

It will explain how to configure web server and Komodo for remote debugging (you should use remote debugging even if both Komodo IDE and web server reside on the same server).

re. tough interface & Mac
Actually the TTX was being developed on Linux, then Windows, then Mac OSX. I still use Windows XP (as VMWare Fusion guest) for SQL Server related testing and IE proof reading. The interface is based on mailbox concept and first hand experience running medium scale customer service center - the help desk is communication tool, rather than a set of fancy bells and whistles. Do not get me wrong, I am not against good bells and nice whistles, but the interface must follow real life workflow.
Logged

Follow me on: LinkedIn
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #10 on: May 07, 2008, 10:30:57 AM »

Just enter this line into the Komodo Help search box

CGI Debugging

I did that yesterday and it seems easy enough but still no joy.  My question was more about how to configure OS X to run TTX locally within the Komodo environment.

Based on your following comments, it would seem that I'd need to set it up on a web server in OS X Server same as if I was really going to host it.

I guess I was under the false impression that Komodo would handle all the simulations as long as my OS had Perl installed.  I realize now that makes little sense and feel somewhat silly.

It will explain how to configure web server and Komodo for remote debugging (you should use remote debugging even if both Komodo IDE and web server reside on the same server).

I erroneously thought I could do local debugging since Perl is part of OS X and Komodo would simulate the server environment.

I should just install TTX on the Mac Server on my LAN and use Komodo on my Mac desktop computer.

re. tough interface & Mac
Actually the TTX was being developed on Linux, then Windows, then Mac OSX. I still use Windows XP (as VMWare Fusion guest) for SQL Server related testing and IE proof reading. The interface is based on mailbox concept and first hand experience running medium scale customer service center - the help desk is communication tool, rather than a set of fancy bells and whistles. Do not get me wrong, I am not against good bells and nice whistles, but the interface must follow real life workflow.

For my customers, it's a communication tool-  No different than Outlook Express and it must be just as quick & easy for them to use.  My New Ticket form is just Name, Email, Subject, & Body, just like an email.

For me, it's an organizational tool-  I must be able to see everything together for each job (Ticket) and see all jobs in one place.  Unlike Outlook, where messages could get lost, overlooked, or they have nothing to do with jobs.  Not to mention that email messages themselves sometimes do not arrive due to spam, filters, laziness, etc.   With any live internet connection, just go to my TTX web site, post a message, and it's guaranteed to be in there regardless of email settings, filters, etc.

I never installed the optional TTX email & piping scripts because I felt that TTX was already simple enough to use.  Giving my customers the option of emailing ticket responses seemed like a step backwards towards unreliability... not with TTX but with email in general.  I tell them all that if they want prompt service they have to keep all the messages within TTX.

I like the interface, it's simple, makes sense, and flows logically, that's why I called it nice & tight.  It's also very easy to customize with a little CSS.  And I wouldn't enjoy being moderator here if I didn't enjoy tweaking TTX.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.031 seconds with 18 queries.